Commit c162ff0a authored by Chunfeng Yun's avatar Chunfeng Yun Committed by Felipe Balbi

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: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 86763723
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment