aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAndre Przywara2022-07-02 01:45:10 +0100
committerTom Rini2022-07-04 08:00:36 -0400
commit9125b4b021d81b72d946a08775d62355a59f6fab (patch)
tree29b567a8d7b4856791838f94c1e18e918781c9d4 /drivers/usb/host
parent730fc474b1bcf6ae7b79fe02d9c7318778189827 (diff)
usb: host: ehci-generic: Fix error check
Commit 81755b8c20fe ("usb: host: ehci-generic: Make resets and clocks optional") improved the error check to cover the reset property being optional. However this was using the wrong error variable for the check, so would now never fail. Use the correct error variable for checking the result of reset_get_bulk(), to actually report genuine errors. Fixes: 81755b8c20fe ("usb: host: ehci-generic: Make resets and clocks optional") Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index 15267e9a05a..75c73bfe4e8 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -81,7 +81,7 @@ static int ehci_usb_probe(struct udevice *dev)
}
err = reset_get_bulk(dev, &priv->resets);
- if (ret && ret != -ENOENT) {
+ if (err && err != -ENOENT) {
dev_err(dev, "Failed to get resets (err=%d)\n", err);
goto clk_err;
}