diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-05-21 17:37:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:46 -0400 |
commit | be475d9027a07069407a19980d1a4fcb7b18b23c (patch) | |
tree | 7af3bcb99fb70d12c2c0f0b9c47e196560241eff /drivers/usb/storage | |
parent | 9a4b5e36ce58febdd2039dd4d129ee7edf4f5536 (diff) |
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>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/option_ms.c | 8 | ||||
-rw-r--r-- | drivers/usb/storage/sierra_ms.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/storage/option_ms.c b/drivers/usb/storage/option_ms.c index 126ea3424c03..0d8853339bb6 100644 --- a/drivers/usb/storage/option_ms.c +++ b/drivers/usb/storage/option_ms.c | |||
@@ -96,7 +96,7 @@ int option_ms_init(struct us_data *us) | |||
96 | udev->descriptor.bDeviceSubClass != 0 || | 96 | udev->descriptor.bDeviceSubClass != 0 || |
97 | udev->descriptor.bDeviceProtocol != 0 || | 97 | udev->descriptor.bDeviceProtocol != 0 || |
98 | udev->actconfig->desc.bNumInterfaces == 3) | 98 | udev->actconfig->desc.bNumInterfaces == 3) |
99 | return USB_STOR_TRANSPORT_GOOD; | 99 | return 0; |
100 | 100 | ||
101 | US_DEBUGP("Option MS: option_ms_init called\n"); | 101 | US_DEBUGP("Option MS: option_ms_init called\n"); |
102 | 102 | ||
@@ -107,7 +107,7 @@ int option_ms_init(struct us_data *us) | |||
107 | iface_desc->desc.bInterfaceProtocol != 0x50) { | 107 | iface_desc->desc.bInterfaceProtocol != 0x50) { |
108 | US_DEBUGP("Option MS: mass storage interface not found, no action " | 108 | US_DEBUGP("Option MS: mass storage interface not found, no action " |
109 | "required\n"); | 109 | "required\n"); |
110 | return USB_STOR_TRANSPORT_GOOD; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | /* Find the mass storage bulk endpoints */ | 113 | /* Find the mass storage bulk endpoints */ |
@@ -127,7 +127,7 @@ int option_ms_init(struct us_data *us) | |||
127 | if (!ep_in_size || !ep_out_size) { | 127 | if (!ep_in_size || !ep_out_size) { |
128 | US_DEBUGP("Option MS: mass storage endpoints not found, no action " | 128 | US_DEBUGP("Option MS: mass storage endpoints not found, no action " |
129 | "required\n"); | 129 | "required\n"); |
130 | return USB_STOR_TRANSPORT_GOOD; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* Force Modem mode */ | 133 | /* Force Modem mode */ |
@@ -143,6 +143,6 @@ int option_ms_init(struct us_data *us) | |||
143 | " requests it\n"); | 143 | " requests it\n"); |
144 | } | 144 | } |
145 | 145 | ||
146 | return USB_STOR_TRANSPORT_GOOD; | 146 | return 0; |
147 | } | 147 | } |
148 | 148 | ||
diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c index 4359a2cb42df..4395c4100ec2 100644 --- a/drivers/usb/storage/sierra_ms.c +++ b/drivers/usb/storage/sierra_ms.c | |||
@@ -202,6 +202,6 @@ int sierra_ms_init(struct us_data *us) | |||
202 | complete: | 202 | complete: |
203 | result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst); | 203 | result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst); |
204 | 204 | ||
205 | return USB_STOR_TRANSPORT_GOOD; | 205 | return 0; |
206 | } | 206 | } |
207 | 207 | ||