staging: usbip: stub_main: correctly handle return value

ret == 0 means success, anything else is failure.

Signed-off-by: navin patidar <navinp@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
navin patidar 2013-09-10 10:44:07 +05:30 committed by Greg Kroah-Hartman
parent 14ab3daaea
commit 1583aeb53c

View File

@ -255,14 +255,14 @@ static int __init usbip_host_init(void)
}
ret = usb_register(&stub_driver);
if (ret < 0) {
if (ret) {
pr_err("usb_register failed %d\n", ret);
goto err_usb_register;
}
ret = driver_create_file(&stub_driver.drvwrap.driver,
&driver_attr_match_busid);
if (ret < 0) {
if (ret) {
pr_err("driver_create_file failed\n");
goto err_create_file;
}