Skip to contentSkip to conversation

usb: usbip: fix odd_ptr_err.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Feb 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: usbip: fix odd_ptr_err.cocci warnings

From: kernel test robot <[email protected]>

PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

---

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20210219-175233/Tetsuo-Handa/usb-usbip-serialize-attach-detach-operations/20210219-083847
head:   32963105fe23b600644ac10f0f9a42124a289990
commit: 32963105fe23b600644ac10f0f9a42124a289990 usb: usbip: serialize attach/detach operations

:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

The above link doesn't work for me, so I don't know whether the goto label is correct.

 usbip_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/usbip/usbip_common.c +1 -1
@@ -775,7 +775,7 @@ int usbip_prepare_threads(struct usbip_t
 	}
 	tx = kthread_create(tx_fn, ud, tx_name);
 	if (IS_ERR(tx)) {
-		err = PTR_ERR(rx);
+		err = PTR_ERR(tx);
 		goto out_rx;
 	}
 	uti->tcp_socket = socket;