linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe
@ 2020-08-24  8:04 Ye Bin
  2020-08-24  8:21 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Ye Bin @ 2020-08-24  8:04 UTC (permalink / raw)
  To: leoyang.li, linux-usb, linuxppc-dev; +Cc: Ye Bin

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-25 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-24  8:04 [PATCH] usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe Ye Bin
2020-08-24  8:21 ` Greg KH
2020-08-24  8:49   ` Joakim Tjernlund
2020-08-24 13:58     ` Felipe Balbi
2020-08-24 14:12       ` Joakim Tjernlund
2020-08-25  8:53         ` Felipe Balbi
2020-08-25  9:02           ` Joakim Tjernlund

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).