lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a72gck4j.fsf@miraculix.mork.no>
Date:   Sun, 10 May 2020 09:41:16 +0200
From:   Bjørn Mork <bjorn@...k.no>
To:     Colin King <colin.king@...onical.com>
Cc:     "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        linux-usb@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: usb: qmi_wwan: remove redundant assignment to variable status

Colin King <colin.king@...onical.com> writes:

> From: Colin Ian King <colin.king@...onical.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@...onical.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@...k.no>
Fixes: 8492ed45aa5d ("qmi-wwan: use common parser")

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ