From: Ye Bin <yebin10@huawei.com>
To: <leoyang.li@nxp.com>, <linux-usb@vger.kernel.org>,
<linuxppc-dev@lists.ozlabs.org>
Cc: Ye Bin <yebin10@huawei.com>
Subject: [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe
Date: Mon, 24 Aug 2020 16:04:37 +0800 [thread overview]
Message-ID: <20200824080437.229826-1-yebin10@huawei.com> (raw)
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/usb/gadget/udc/fsl_udc_core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
index a6f7b2594c09..3e98740b8cfc 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -2439,11 +2439,12 @@ static int fsl_udc_probe(struct platform_device *pdev)
/* DEN is bidirectional ep number, max_ep doubles the number */
udc_controller->max_ep = (dccparams & DCCPARAMS_DEN_MASK) * 2;
- udc_controller->irq = platform_get_irq(pdev, 0);
- if (udc_controller->irq <= 0) {
- ret = udc_controller->irq ? : -ENODEV;
+ ret = platform_get_irq(pdev, 0);
+ if (ret <= 0) {
+ ret = ret ? : -ENODEV;
goto err_iounmap;
}
+ udc_controller->irq = ret;
ret = request_irq(udc_controller->irq, fsl_udc_irq, IRQF_SHARED,
driver_name, udc_controller);
--
2.25.4
next reply other threads:[~2020-08-24 8:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 8:04 Ye Bin [this message]
2020-08-24 8:21 ` [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe Greg KH
2020-08-24 8:21 ` Greg KH
2020-08-24 8:49 ` Joakim Tjernlund
2020-08-24 8:49 ` Joakim Tjernlund
2020-08-24 13:58 ` Felipe Balbi
2020-08-24 13:58 ` Felipe Balbi
2020-08-24 14:12 ` Joakim Tjernlund
2020-08-24 14:12 ` Joakim Tjernlund
2020-08-25 8:53 ` Felipe Balbi
2020-08-25 8:53 ` Felipe Balbi
2020-08-25 9:02 ` Joakim Tjernlund
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=20200824080437.229826-1-yebin10@huawei.com \
--to=yebin10@huawei.com \
--cc=leoyang.li@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.