usb: dwc3-of-simple: fix error check of clk_get_bulk when disabled
authorNeil Armstrong <narmstrong@baylibre.com>
Thu, 12 Apr 2018 08:13:50 +0000 (10:13 +0200)
committerMarek Vasut <marex@denx.de>
Sat, 21 Apr 2018 16:38:56 +0000 (18:38 +0200)
The disabled clk API returns -ENOSYS unlike the reset API returning -ENOTSUPP.

Fixes: ca7fdc8b1267 ("usb: host: Add simple of glue driver for DWC3 USB Controllers integration")
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
drivers/usb/host/dwc3-of-simple.c

index abc3928f8bdd30fbd5f40d65a9477707fc38274b..440dd1027d510a87473758bb07a3beb03987bdc3 100644 (file)
@@ -50,7 +50,7 @@ static int dwc3_of_simple_clk_init(struct udevice *dev,
        int ret;
 
        ret = clk_get_bulk(dev, &simple->clks);
-       if (ret == -ENOTSUPP)
+       if (ret == -ENOSYS)
                return 0;
        if (ret)
                return ret;