Răsfoiți Sursa

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 <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Paul Kocialkowski 10 ani în urmă
părinte
comite
8a440b09f2
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/usb/musb-new/sunxi.c

+ 1 - 1
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;
 			}