From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sat, 15 Apr 2017 11:46:22 +0000 (+0200)
Subject: musb: properly detect failed initialization of controller
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2511b2ed4df36467898952aa7825abbe8d0a211f;p=project%2Fbcm63xx%2Fu-boot.git

musb: properly detect failed initialization of controller

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>
---

diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index ea71f75947..8662c0ff70 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -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;
 	}