LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Nishka Dasgupta <nishkadg.linux@gmail.com>
Cc: gregkh@linuxfoundation.org, colin.king@canonical.com,
herbert@gondor.apana.org.au, qader.aymen@gmail.com,
sergio.paracuellos@gmail.com, bhanusreemahesh@gmail.com,
mattmccoy110@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ks7010: Remove initialisation
Date: Fri, 24 May 2019 10:04:04 +0300 [thread overview]
Message-ID: <20190524070404.GV31203@kadam> (raw)
In-Reply-To: <20190524055238.3581-1-nishkadg.linux@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2019-05-24 7:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 5:52 Nishka Dasgupta
2019-05-24 7:04 ` Dan Carpenter [this message]
2019-05-24 5:56 Nishka Dasgupta
2019-05-24 6:52 ` Greg KH
2019-05-24 7:01 ` Nishka Dasgupta
2019-05-24 7:42 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190524070404.GV31203@kadam \
--to=dan.carpenter@oracle.com \
--cc=bhanusreemahesh@gmail.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mattmccoy110@gmail.com \
--cc=nishkadg.linux@gmail.com \
--cc=qader.aymen@gmail.com \
--cc=sergio.paracuellos@gmail.com \
--subject='Re: [PATCH] staging: ks7010: Remove initialisation' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).