From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Rob Herring <robh+dt@kernel.org>,
"Mathias Nyman" <mathias.nyman@intel.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-usb@vger.kernel.org>, <linux-mediatek@lists.infradead.org>,
<devicetree@vger.kernel.org>
Subject: Re: [PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init()
Date: Mon, 9 Oct 2017 09:18:43 +0800 [thread overview]
Message-ID: <1507511923.17567.28.camel@mhfsdcap03> (raw)
In-Reply-To: <46f6e8f0-0398-e33e-10fc-d0db6ce06db0@cogentembedded.com>
On Sat, 2017-09-30 at 16:00 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 9/28/2017 3:17 AM, Chunfeng Yun wrote:
>
> > When fail to get irq number, platform_get_irq() may return
>
> Failing. IRQ. :-)
I'll modify it, thank you
>
> > -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) {
>
> This is good as the function no longer returns 0 on error. Even when it
> did, 0 could mean a valid IRQ as well...
>
> > dev_err(dev, "fail to get irq number\n");
> > - return -ENODEV;
> > + return mtu->irq;
> > }
> > dev_info(dev, "irq %d\n", mtu->irq);
> >
>
> MBR, Sergei
prev parent reply other threads:[~2017-10-09 1:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 10:58 [PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init() Chunfeng Yun
2017-09-27 10:58 ` [PATCH 02/12] usb: mtu3: support option to disable usb3 ports Chunfeng Yun
2017-09-27 10:58 ` [PATCH 03/12] usb: mtu3: remove dummy wakeup debounce clocks Chunfeng Yun
2017-09-27 10:58 ` [PATCH 04/12] usb: mtu3: add optional mcu and dma bus clocks Chunfeng Yun
2017-09-27 10:58 ` [PATCH 05/12] usb: mtu3: support 36-bit DMA address Chunfeng Yun
2017-09-27 10:58 ` [PATCH 06/12] usb: mtu3: use FORCE/RG_IDDIG to implement manual DRD switch Chunfeng Yun
2017-09-27 10:58 ` [PATCH 07/12] usb: mtu3: add support for usb3.1 IP Chunfeng Yun
2017-09-29 14:11 ` Chunfeng Yun
2017-09-27 10:58 ` [PATCH 08/12] usb: mtu3: get optional vbus for host only mode Chunfeng Yun
2017-09-27 10:58 ` [PATCH 09/12] usb: mtu3: set invalid dr_mode as dual-role mode Chunfeng Yun
2017-09-28 0:17 ` [PATCH 10/12] dt-bindings: usb: mtu3: add a optional property to disable u3ports Chunfeng Yun
2017-10-05 22:31 ` Rob Herring
2017-10-09 2:43 ` Chunfeng Yun
2017-09-28 0:17 ` [PATCH 11/12] dt-bindings: usb: mtu3: remove dummy clocks and add optional ones Chunfeng Yun
2017-09-28 0:17 ` [PATCH 12/12] dt-bindings: usb: mtu3: remove optional pinctrls Chunfeng Yun
2017-10-05 22:33 ` Rob Herring
2017-10-09 3:25 ` Chunfeng Yun
2017-09-30 13:00 ` [PATCH 01/12] usb: mtu3: fix error return code in ssusb_gadget_init() Sergei Shtylyov
2017-10-09 1:18 ` Chunfeng Yun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507511923.17567.28.camel@mhfsdcap03 \
--to=chunfeng.yun@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathias.nyman@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).