projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
usbip: vhci_hcd: fix return value check in add_platform_device()
[cascardo/linux.git]
/
drivers
/
usb
/
usbip
/
vhci_hcd.c
diff --git
a/drivers/usb/usbip/vhci_hcd.c
b/drivers/usb/usbip/vhci_hcd.c
index
96f2dac
..
03eccf2
100644
(file)
--- a/
drivers/usb/usbip/vhci_hcd.c
+++ b/
drivers/usb/usbip/vhci_hcd.c
@@
-1211,8
+1211,8
@@
static int add_platform_device(int id)
dev_nr = id;
pdev = platform_device_register_simple(driver_name, dev_nr, NULL, 0);
- if (
pdev == NULL
)
- return
-ENODEV
;
+ if (
IS_ERR(pdev)
)
+ return
PTR_ERR(pdev)
;
*(vhci_pdevs + id) = pdev;
return 0;