Re: [PATCH] drivers/net/usb: remove redundant status variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 10, 2022 at 10:44:02AM +0000, cgel.zte@xxxxxxxxx wrote:
> From: Minghao Chi <chi.minghao@xxxxxxxxxx>
> 
> Return value from sierra_net_send_cmd() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
> Signed-off-by: CGEL ZTE <cgel.zte@xxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux