ChangeSet 1.2181.4.25, 2005/03/17 18:13:34-08:00, [EMAIL PROTECTED]
[PATCH] USB: compile warning cleanup
compile warning cleanup - handle error return from
scsi_add_host
Signed-off-by: Stephen Biggs <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
microtek.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff -Nru a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
--- a/drivers/usb/image/microtek.c 2005-03-30 15:09:25 -08:00
+++ b/drivers/usb/image/microtek.c 2005-03-30 15:09:25 -08:00
@@ -703,6 +703,7 @@
int ep_in_set[3]; /* this will break if we have more than three
endpoints
which is why we check */
int *ep_in_current = ep_in_set;
+ int err_retval = -ENOMEM;
struct mts_desc * new_desc;
struct vendor_product const* p;
@@ -809,7 +810,10 @@
goto out_free_urb;
new_desc->host->hostdata[0] = (unsigned long)new_desc;
- scsi_add_host(new_desc->host, NULL); /* XXX handle failure */
+ if (scsi_add_host(new_desc->host, NULL)) {
+ err_retval = -EIO;
+ goto out_free_urb;
+ }
scsi_scan_host(new_desc->host);
usb_set_intfdata(intf, new_desc);
@@ -820,7 +824,7 @@
out_kfree:
kfree(new_desc);
out:
- return -ENOMEM;
+ return err_retval;
}
static void mts_usb_disconnect (struct usb_interface *intf)
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html