提交 c162ff0a 编写于 作者: C Chunfeng Yun 提交者: 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: NChunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册