USB: usb-storage: fix return values from init functions
This patch (as1242) fixes the return values from the special
init functions in usb-storage. They are supposed to return 0 for
success, not USB_STOR_TRANSPORT_GOOD.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/storage/option_ms.c b/drivers/usb/storage/option_ms.c
index 126ea34..0d88533 100644
--- a/drivers/usb/storage/option_ms.c
+++ b/drivers/usb/storage/option_ms.c
@@ -96,7 +96,7 @@
udev->descriptor.bDeviceSubClass != 0 ||
udev->descriptor.bDeviceProtocol != 0 ||
udev->actconfig->desc.bNumInterfaces == 3)
- return USB_STOR_TRANSPORT_GOOD;
+ return 0;
US_DEBUGP("Option MS: option_ms_init called\n");
@@ -107,7 +107,7 @@
iface_desc->desc.bInterfaceProtocol != 0x50) {
US_DEBUGP("Option MS: mass storage interface not found, no action "
"required\n");
- return USB_STOR_TRANSPORT_GOOD;
+ return 0;
}
/* Find the mass storage bulk endpoints */
@@ -127,7 +127,7 @@
if (!ep_in_size || !ep_out_size) {
US_DEBUGP("Option MS: mass storage endpoints not found, no action "
"required\n");
- return USB_STOR_TRANSPORT_GOOD;
+ return 0;
}
/* Force Modem mode */
@@ -143,6 +143,6 @@
" requests it\n");
}
- return USB_STOR_TRANSPORT_GOOD;
+ return 0;
}
diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c
index 4359a2c..4395c41 100644
--- a/drivers/usb/storage/sierra_ms.c
+++ b/drivers/usb/storage/sierra_ms.c
@@ -202,6 +202,6 @@
complete:
result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);
- return USB_STOR_TRANSPORT_GOOD;
+ return 0;
}