linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: storage: datafab: remove redundant assignment of variable result
@ 2021-04-20 11:38 Colin King
  2021-04-20 14:34 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-04-20 11:38 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman, linux-usb, usb-storage
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable result is being assigned with a value that is
never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/storage/datafab.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
index 588818483f4b..bcc4a2fad863 100644
--- a/drivers/usb/storage/datafab.c
+++ b/drivers/usb/storage/datafab.c
@@ -294,7 +294,6 @@ static int datafab_write_data(struct us_data *us,
 		if (reply[0] != 0x50 && reply[1] != 0) {
 			usb_stor_dbg(us, "Gah! write return code: %02x %02x\n",
 				     reply[0], reply[1]);
-			result = USB_STOR_TRANSPORT_ERROR;
 			goto leave;
 		}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: storage: datafab: remove redundant assignment of variable result
  2021-04-20 11:38 [PATCH] usb: storage: datafab: remove redundant assignment of variable result Colin King
@ 2021-04-20 14:34 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2021-04-20 14:34 UTC (permalink / raw)
  To: Colin King
  Cc: Greg Kroah-Hartman, linux-usb, usb-storage, kernel-janitors,
	linux-kernel

On Tue, Apr 20, 2021 at 12:38:18PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable result is being assigned with a value that is
> never read, the assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Acked-by: Alan Stern <stern@rowland.harvard.edu>

>  drivers/usb/storage/datafab.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
> index 588818483f4b..bcc4a2fad863 100644
> --- a/drivers/usb/storage/datafab.c
> +++ b/drivers/usb/storage/datafab.c
> @@ -294,7 +294,6 @@ static int datafab_write_data(struct us_data *us,
>  		if (reply[0] != 0x50 && reply[1] != 0) {
>  			usb_stor_dbg(us, "Gah! write return code: %02x %02x\n",
>  				     reply[0], reply[1]);
> -			result = USB_STOR_TRANSPORT_ERROR;
>  			goto leave;
>  		}
>  
> -- 
> 2.30.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-20 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 11:38 [PATCH] usb: storage: datafab: remove redundant assignment of variable result Colin King
2021-04-20 14:34 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).