]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/image/microtek.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / drivers / usb / image / microtek.c
index 3038ed0700d359e29be173decd1b6d7578120f8c..51bd80d2b8ccb4379756b83d6185e175b2bbd4b8 100644 (file)
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/signal.h>
 #include <linux/errno.h>
 #include <linux/random.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <linux/smp_lock.h>
 #include <linux/usb.h>
 #include <linux/proc_fs.h>
 
@@ -796,7 +794,7 @@ static int mts_usb_probe(struct usb_interface *intf,
 
        new_desc->context.scsi_status = kmalloc(1, GFP_KERNEL);
        if (!new_desc->context.scsi_status)
-               goto out_kfree2;
+               goto out_free_urb;
 
        new_desc->usb_dev = dev;
        new_desc->usb_intf = intf;
@@ -822,18 +820,20 @@ static int mts_usb_probe(struct usb_interface *intf,
        new_desc->host = scsi_host_alloc(&mts_scsi_host_template,
                        sizeof(new_desc));
        if (!new_desc->host)
-               goto out_free_urb;
+               goto out_kfree2;
 
        new_desc->host->hostdata[0] = (unsigned long)new_desc;
        if (scsi_add_host(new_desc->host, NULL)) {
                err_retval = -EIO;
-               goto out_free_urb;
+               goto out_host_put;
        }
        scsi_scan_host(new_desc->host);
 
        usb_set_intfdata(intf, new_desc);
        return 0;
 
+ out_host_put:
+       scsi_host_put(new_desc->host);
  out_kfree2:
        kfree(new_desc->context.scsi_status);
  out_free_urb: