mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
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>
This commit is contained in:
parent
3c476d841d
commit
2511b2ed4d
@ -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);
|
*musbp = musb_init_controller(plat, (struct device *)bdata, ctl_regs);
|
||||||
if (!musbp) {
|
if (!*musbp) {
|
||||||
printf("Failed to init the controller\n");
|
printf("Failed to init the controller\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user