public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usbip: vudc: Fix apparent cut-n-paste error
@ 2016-05-31 15:25 Dave Jones
  2016-06-01 10:21 ` Krzysztof Opasiak
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2016-05-31 15:25 UTC (permalink / raw)
  To: Linux Kernel
  Cc: Igor Kotrasinski, Karol Kosik, Krzysztof Opasiak,
	Greg Kroah-Hartman

Coverity picked up that this looks like a cut-n-paste from an almost
identical sequence below that didn't get its variable renamed.

Signed-off-by: Dave Jones <davej@codemonkey.org.uk>

diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
index 8994a13819ab..7091848df6c8 100644
--- a/drivers/usb/usbip/vudc_dev.c
+++ b/drivers/usb/usbip/vudc_dev.c
@@ -450,7 +450,7 @@ static void vudc_shutdown(struct usbip_device *ud)
 	if (ud->tcp_socket)
 		kernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR);
 
-	if (ud->tcp_tx) {
+	if (ud->tcp_rx) {
 		kthread_stop_put(ud->tcp_rx);
 		ud->tcp_rx = NULL;
 	}

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

* Re: usbip: vudc: Fix apparent cut-n-paste error
  2016-05-31 15:25 usbip: vudc: Fix apparent cut-n-paste error Dave Jones
@ 2016-06-01 10:21 ` Krzysztof Opasiak
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Opasiak @ 2016-06-01 10:21 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, Karol Kosik, Greg Kroah-Hartman



On 05/31/2016 05:25 PM, Dave Jones wrote:
> Coverity picked up that this looks like a cut-n-paste from an almost
> identical sequence below that didn't get its variable renamed.
> 
> Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
> 
> diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
> index 8994a13819ab..7091848df6c8 100644
> --- a/drivers/usb/usbip/vudc_dev.c
> +++ b/drivers/usb/usbip/vudc_dev.c
> @@ -450,7 +450,7 @@ static void vudc_shutdown(struct usbip_device *ud)
>  	if (ud->tcp_socket)
>  		kernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR);
>  
> -	if (ud->tcp_tx) {
> +	if (ud->tcp_rx) {
>  		kthread_stop_put(ud->tcp_rx);
>  		ud->tcp_rx = NULL;
>  	}
> 
> 

Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>

-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

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

end of thread, other threads:[~2016-06-01 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 15:25 usbip: vudc: Fix apparent cut-n-paste error Dave Jones
2016-06-01 10:21 ` Krzysztof Opasiak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox