2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-12 23:54:19 +08:00

usb: mtu3: fix error return code in ssusb_gadget_init()

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 <chunfeng.yun@mediatek.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Chunfeng Yun 2017-10-13 17:10:37 +08:00 committed by Felipe Balbi
parent 86763723ee
commit c162ff0aaa

View File

@ -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);