]> err.no Git - linux-2.6/commitdiff
USB: isp1760: Assign resource fields before adding hcd
authorNate Case <ncase@xes-inc.com>
Wed, 21 May 2008 21:28:20 +0000 (16:28 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jun 2008 00:06:33 +0000 (17:06 -0700)
This fixes the bogus "io mem 0x00000000" message printed
during driver init due to hcd->rsrc_start being assigned after
the call to usb_add_hcd().

Signed-off-by: Nate Case <ncase@xes-inc.com>
Acked-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/isp1760-hcd.c

index c9cec87382619f8f97c1e1d5a0f124e8836f372a..65aa5ecf569aca520473c59e4f86e5e5b7f63fb6 100644 (file)
@@ -2207,14 +2207,14 @@ struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq,
                goto err_put;
        }
 
-       ret = usb_add_hcd(hcd, irq, irqflags);
-       if (ret)
-               goto err_unmap;
-
        hcd->irq = irq;
        hcd->rsrc_start = res_start;
        hcd->rsrc_len = res_len;
 
+       ret = usb_add_hcd(hcd, irq, irqflags);
+       if (ret)
+               goto err_unmap;
+
        return hcd;
 
 err_unmap: