From: Paul Kocialkowski Date: Sun, 15 Mar 2015 17:27:44 +0000 (+0100) Subject: sunxi: musb: Return early on VBUS GPIO error instead of on a positive value X-Git-Tag: v2015.04-rc5~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a440b09f21ab8ec72b3aedf4d6f3f53494d7149;p=u-boot sunxi: musb: Return early on VBUS GPIO error instead of on a positive value This allows printing the error message when VBUS is detected, as it would with AXP VBUS detect. Signed-off-by: Paul Kocialkowski Acked-by: Hans de Goede Signed-off-by: Hans de Goede --- diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 4d8c15a5e0..90aaec60d5 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -261,7 +261,7 @@ static int sunxi_musb_init(struct musb *musb) } err = gpio_get_value(vbus_det); - if (err) { + if (err < 0) { gpio_free(vbus_det); return -EIO; }