Skip to content

Commit

Permalink
USB: usb-storage: fix return values from init functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jun 16, 2009
1 parent 9a4b5e3 commit be475d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/storage/option_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int option_ms_init(struct us_data *us)
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");

Expand All @@ -107,7 +107,7 @@ int option_ms_init(struct us_data *us)
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 */
Expand All @@ -127,7 +127,7 @@ int option_ms_init(struct us_data *us)
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 */
Expand All @@ -143,6 +143,6 @@ int option_ms_init(struct us_data *us)
" requests it\n");
}

return USB_STOR_TRANSPORT_GOOD;
return 0;
}

2 changes: 1 addition & 1 deletion drivers/usb/storage/sierra_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ int sierra_ms_init(struct us_data *us)
complete:
result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);

return USB_STOR_TRANSPORT_GOOD;
return 0;
}

0 comments on commit be475d9

Please sign in to comment.