From: Chunfeng Yun Date: Fri, 13 Oct 2017 09:10:37 +0000 (+0800) Subject: usb: mtu3: fix error return code in ssusb_gadget_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8891ee7e676c0adc59b5e6c298de0b109a1934d5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git usb: mtu3: fix error return code in ssusb_gadget_init() [ Upstream commit c162ff0aaaac456ef29aebd1e9d4d3e305cd3279 ] When failing to get IRQ number, platform_get_irq() may return -EPROBE_DEFER, but we ignore it and always return -ENODEV, so fix it. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c index 99c65b0788ff..947579842ad7 100644 --- a/drivers/usb/mtu3/mtu3_core.c +++ b/drivers/usb/mtu3/mtu3_core.c @@ -774,9 +774,9 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) return -ENOMEM; mtu->irq = platform_get_irq(pdev, 0); - if (mtu->irq <= 0) { + if (mtu->irq < 0) { dev_err(dev, "fail to get irq number\n"); - return -ENODEV; + return mtu->irq; } dev_info(dev, "irq %d\n", mtu->irq);