Explorar o código

musb: Properly call musb_stop() on probe failure

musb_lowlevelinit(): if no device is plugged in / detected call
musb_stop() to undo the preceding musb_start() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede %!s(int64=9) %!d(string=hai) anos
pai
achega
bf31323064
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      drivers/usb/musb-new/musb_uboot.c

+ 3 - 1
drivers/usb/musb-new/musb_uboot.c

@@ -237,8 +237,10 @@ int musb_lowlevel_init(struct musb_host_data *host)
 		if (musb_readb(mbase, MUSB_DEVCTL) & MUSB_DEVCTL_HM)
 			break;
 	} while (get_timer(0) < timeout);
-	if (get_timer(0) >= timeout)
+	if (get_timer(0) >= timeout) {
+		musb_stop(host->host);
 		return -ENODEV;
+	}
 
 	_musb_reset_root_port(host, NULL);
 	host->host->is_active = 1;