[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190524070404.GV31203@kadam>
Date: Fri, 24 May 2019 10:04:04 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Nishka Dasgupta <nishkadg.linux@...il.com>
Cc: gregkh@...uxfoundation.org, colin.king@...onical.com,
herbert@...dor.apana.org.au, qader.aymen@...il.com,
sergio.paracuellos@...il.com, bhanusreemahesh@...il.com,
mattmccoy110@...il.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: ks7010: Remove initialisation
On Fri, May 24, 2019 at 11:22:38AM +0530, Nishka Dasgupta wrote:
> The initial value of return variable ret is never used, so it can be
> removed.
> Issue found with Coccinelle.
>
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@...il.com>
> ---
> drivers/staging/ks7010/ks_hostif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index e089366ed02a..3775fd4b89ae 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -1067,7 +1067,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
> unsigned int length = 0;
> struct hostif_data_request *pp;
> unsigned char *p;
> - int result = 0;
> + int result;
You should get rid of the result variable completely and just use "ret"
instead. No need for two variables.
regards,
dan carpenter
Powered by blists - more mailing lists