]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/musb-new/musb_uboot.c
musb: Allow musb_platform_enable to return an error code
[karo-tx-uboot.git] / drivers / usb / musb-new / musb_uboot.c
index 1bf676c589b2ee86b8d9fae997c58b18743f3080..70e87c9f0dfcec25a07125c5482aa779d485a5c8 100644 (file)
@@ -217,13 +217,17 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
        void *mbase;
        /* USB spec says it may take up to 1 second for a device to connect */
        unsigned long timeout = get_timer(0) + 1000;
+       int ret;
 
        if (!host) {
                printf("MUSB host is not registered\n");
                return -ENODEV;
        }
 
-       musb_start(host);
+       ret = musb_start(host);
+       if (ret)
+               return ret;
+
        mbase = host->mregs;
        do {
                if (musb_readb(mbase, MUSB_DEVCTL) & MUSB_DEVCTL_HM)