]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 8 May 2021 01:53:10 +0000 (09:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:56:40 +0000 (10:56 +0200)
commit 0b2b149e918f6dddb4ea53615551bf7bc131f875 upstream.

Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210508015310.1627-1-thunder.leizhen@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-imx8mp.c

index 75f0042b998b11ffbb1cf932624b12c729914454..84c1a4ac244493d9cdc726ccac5e4a1bc16a53dd 100644 (file)
@@ -167,6 +167,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
 
        dwc3_np = of_get_child_by_name(node, "dwc3");
        if (!dwc3_np) {
+               err = -ENODEV;
                dev_err(dev, "failed to find dwc3 core child\n");
                goto disable_rpm;
        }