From: "Bjørn Mork" <bjorn@mork.no>
To: Colin King <colin.king@canonical.com>
Cc: "David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: usb: qmi_wwan: remove redundant assignment to variable status
Date: Sun, 10 May 2020 09:41:16 +0200 [thread overview]
Message-ID: <87a72gck4j.fsf@miraculix.mork.no> (raw)
In-Reply-To: <20200509215756.506840-2-colin.king@canonical.com> (Colin King's message of "Sat, 9 May 2020 22:57:56 +0100")
Colin King <colin.king@canonical.com> writes:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable status is being initializeed with a value that is never read
> and it is being updated later with a new value. The initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/usb/qmi_wwan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index 4bb8552a00d3..b0eab6e5279d 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -719,7 +719,7 @@ static int qmi_wwan_change_dtr(struct usbnet *dev, bool on)
>
> static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
> {
> - int status = -1;
> + int status;
> u8 *buf = intf->cur_altsetting->extra;
> int len = intf->cur_altsetting->extralen;
> struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc;
Yes, looks like this initialization was made redundant when the CDC
descriptor parsing was moved to usbcore. Thanks.
Adding Fixes for documentation only, not as a stable hint. This is
cleanup only and not suitable for stable IMHO.
Acked-by: Bjørn Mork <bjorn@mork.no>
Fixes: 8492ed45aa5d ("qmi-wwan: use common parser")
next prev parent reply other threads:[~2020-05-10 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 21:57 Colin King
2020-05-09 21:57 ` Colin King
2020-05-10 7:41 ` Bjørn Mork [this message]
2020-05-10 18:14 ` Jakub Kicinski
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=87a72gck4j.fsf@miraculix.mork.no \
--to=bjorn@mork.no \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®