Re: [PATCH linux] usb-storage: Remove redundant assignments

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

 



On Thu, Dec 30, 2021 at 06:38:19AM +0000, cgel.zte@xxxxxxxxx wrote:
> From: luo penghao <luo.penghao@xxxxxxxxxx>
> 
> The assignments in these two places will be overwritten, so they
> should be deleted.
> 
> The clang_analyzer complains as follows:
> 
> drivers/usb/storage/sierra_ms.c:
> 
> Value stored to 'retries' is never read
> Value stored to 'result' is never read
> 
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: luo penghao <luo.penghao@xxxxxxxxxx>
> ---

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

>  drivers/usb/storage/sierra_ms.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c
> index b9f78ef..0774ba2 100644
> --- a/drivers/usb/storage/sierra_ms.c
> +++ b/drivers/usb/storage/sierra_ms.c
> @@ -130,8 +130,6 @@ int sierra_ms_init(struct us_data *us)
>  	struct swoc_info *swocInfo;
>  	struct usb_device *udev;
>  
> -	retries = 3;
> -	result = 0;
>  	udev = us->pusb_dev;
>  
>  	/* Force Modem mode */
> -- 
> 2.15.2
> 
> 



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

  Powered by Linux