PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Nobuo Iwata <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Julia Lawall <[email protected]> --- I haven't checked the complete context, but the code looks suspicious. usbip_ux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/usbip/usbip_ux.c +++ b/drivers/usb/usbip/usbip_ux.c @@ -571,7 +571,7 @@ static int __init usbip_ux_init(void) usbip_ux_dev = device_create(usbip_ux_class, NULL, usbip_ux_devno, NULL, USBIP_UX_DEV_NAME); if (IS_ERR(usbip_ux_dev)) { pr_err("Fail to create sysfs entry for %s\n", USBIP_UX_DEV_NAME); - ret = PTR_ERR(usbip_ux_class); + ret = PTR_ERR(usbip_ux_dev); goto err_cdev_del; } return 0; -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
