usbip: vhci_hcd: fix return value check in add_platform_device()
authorWei Yongjun <weiyj.lk@gmail.com>
Fri, 12 Aug 2016 11:22:22 +0000 (11:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2016 14:25:59 +0000 (16:25 +0200)
commit6e958051cb0742dd54bb61528c130bd6eaecae0d
treee327c5002cfbfa1b6d372362b6d41e35bdf624ac
parentd35cbed6047c0207b4be9ff60b541c331b62b59c
usbip: vhci_hcd: fix return value check in add_platform_device()

In case of error, the function platform_device_register_simple() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vhci_hcd.c