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] [day] [month] [year] [list]
Message-ID: <YdwQoMV2Ay5eibyN@kroah.com>
Date:   Mon, 10 Jan 2022 11:55:28 +0100
From:   Greg KH <greg@...ah.com>
To:     cgel.zte@...il.com
Cc:     davem@...emloft.net, kuba@...nel.org, chi.minghao@....com.cn,
        andrew@...n.ch, grundler@...omium.org, oneukum@...e.com,
        linux-usb@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] drivers/net/usb: remove redundant status variable

On Mon, Jan 10, 2022 at 10:44:02AM +0000, cgel.zte@...il.com wrote:
> From: Minghao Chi <chi.minghao@....com.cn>
> 
> Return value from sierra_net_send_cmd() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
> ---
>  drivers/net/usb/sierra_net.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
> index bb4cbe8fc846..818ff8a24098 100644
> --- a/drivers/net/usb/sierra_net.c
> +++ b/drivers/net/usb/sierra_net.c
> @@ -334,15 +334,12 @@ static int sierra_net_send_cmd(struct usbnet *dev,
>  
>  static int sierra_net_send_sync(struct usbnet *dev)
>  {
> -	int  status;
>  	struct sierra_net_data *priv = sierra_net_get_private(dev);
>  
>  	dev_dbg(&dev->udev->dev, "%s", __func__);

No need for this line anymore, and then, this whole function can be
removed as it would only be 1 line, right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ