Skip to content
Snippets Groups Projects
Commit 8a440b09 authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Hans de Goede
Browse files

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: default avatarPaul Kocialkowski <contact@paulk.fr>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 21866c34
No related branches found
No related tags found
No related merge requests found
...@@ -261,7 +261,7 @@ static int sunxi_musb_init(struct musb *musb) ...@@ -261,7 +261,7 @@ static int sunxi_musb_init(struct musb *musb)
} }
err = gpio_get_value(vbus_det); err = gpio_get_value(vbus_det);
if (err) { if (err < 0) {
gpio_free(vbus_det); gpio_free(vbus_det);
return -EIO; return -EIO;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment