]> git.sur5r.net Git - u-boot/commitdiff
musb: properly detect failed initialization of controller
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 15 Apr 2017 11:46:22 +0000 (13:46 +0200)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Tue, 25 Apr 2017 10:50:11 +0000 (12:50 +0200)
We want to check the result of musb_init_controller
and not the address were the result is stored.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/usb/musb-new/musb_uboot.c

index ea71f759476ef46cf3fde775e1b4d6af93867bfe..8662c0ff70782bb872db836516e3e12a4c6df3a7 100644 (file)
@@ -446,7 +446,7 @@ int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
        }
 
        *musbp = musb_init_controller(plat, (struct device *)bdata, ctl_regs);
-       if (!musbp) {
+       if (!*musbp) {
                printf("Failed to init the controller\n");
                return -EIO;
        }