diff mbox

ASoC: cygnus: remove redundant assignment to pointer 'res'

Message ID 20180308133249.22032-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit 0338753a57aaf331cb7016bbfdba6086bf93149c
Headers show

Commit Message

Colin King March 8, 2018, 1:32 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The pointer res is being initialized with a value that is never read
and re-assigned immediately after, hence the initialization is redundant
and can be removed.

Cleans up clang warning:
sound/soc/bcm/cygnus-ssp.c:1284:19: warning: Value stored to 'res'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/bcm/cygnus-ssp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Scott Branden March 8, 2018, 8:15 p.m. UTC | #1
Looks good.


On 18-03-08 05:32 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer res is being initialized with a value that is never read
> and re-assigned immediately after, hence the initialization is redundant
> and can be removed.
>
> Cleans up clang warning:
> sound/soc/bcm/cygnus-ssp.c:1284:19: warning: Value stored to 'res'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
> ---
>   sound/soc/bcm/cygnus-ssp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
> index abafadc0b534..b733f1446353 100644
> --- a/sound/soc/bcm/cygnus-ssp.c
> +++ b/sound/soc/bcm/cygnus-ssp.c
> @@ -1281,7 +1281,7 @@ static int cygnus_ssp_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct device_node *child_node;
> -	struct resource *res = pdev->resource;
> +	struct resource *res;
>   	struct cygnus_audio *cygaud;
>   	int err = -EINVAL;
>   	int node_count;
diff mbox

Patch

diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index abafadc0b534..b733f1446353 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1281,7 +1281,7 @@  static int cygnus_ssp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *child_node;
-	struct resource *res = pdev->resource;
+	struct resource *res;
 	struct cygnus_audio *cygaud;
 	int err = -EINVAL;
 	int node_count;