Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1740610

[PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init()

From Chunfeng Yun <chunfeng.yun@mediatek.com>
Newsgroups linux.kernel
Subject [PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init()
Date 2017-09-27 13:00 +0200
Message-ID <uuiel-1ki-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


When fail 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>
---
 drivers/usb/mtu3/mtu3_core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 99c65b0..9475798 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);
 
-- 
1.7.9.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init() Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:00 +0200
  [PATCH 09/12] usb: mtu3: set invalid dr_mode as dual-role mode Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:00 +0200
  [PATCH 06/12] usb: mtu3: use FORCE/RG_IDDIG to implement manual DRD switch Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:00 +0200
  [PATCH 03/12] usb: mtu3: remove dummy wakeup debounce clocks Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:10 +0200
  [PATCH 02/12] usb: mtu3: support option to disable usb3 ports Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:10 +0200
  [PATCH 04/12] usb: mtu3: add optional mcu and dma bus clocks Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:10 +0200
  [PATCH 05/12] usb: mtu3: support 36-bit DMA address Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 13:10 +0200
  [PATCH 11/12] dt-bindings: usb: mtu3: remove dummy clocks and add optional ones Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-28 02:20 +0200
  [PATCH 12/12] dt-bindings: usb: mtu3: remove optional pinctrls Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-28 02:20 +0200
  [PATCH 10/12] dt-bindings: usb: mtu3: add a optional property to disable u3ports Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-28 02:20 +0200
  Re: [PATCH 01/12] usb: mtu3: fix error return code in  ssusb_gadget_init() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-09-30 15:10 +0200

csiph-web