Skip to contentSkip to conversation

usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

PATCH Superseded Ye Bin 4 participants 7 messages Aug 24, 2020 – Aug 25, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe

---
 drivers/usb/gadget/udc/fsl_udc_core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/usb/gadget/udc/fsl_udc_core.c +4 -3
index a6f7b2594c09..3e98740b8cfc 100644
@@ -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);
Signature · 1 line
2.25.4
#2 lore raw
Quoted 5 lines · Greg KH
Quoted 1 line · Ye Bin

I can't take patches without any changelog text, sorry.

Still taking patches for fsl_udc_core.c ?
I figured this driver was obsolete and should be moved to one of the Chipidea drivers.

Jocke

#3 lore raw
Quoted 9 lines · Joakim Tjernlund
Quoted 5 lines · Greg KH
Quoted 1 line · Ye Bin

I can't take patches without any changelog text, sorry.

Still taking patches for fsl_udc_core.c ?
I figured this driver was obsolete and should be moved to one of the Chipidea drivers.

Nobody sent any patches to switch over the users of this driver to chipidea. I would love to delete this driver :-)

Signature · 1 line
balbi
#4 lore raw
Quoted 7 lines · Felipe Balbi
Quoted 5 lines · Joakim Tjernlund
Quoted 4 lines · Greg KH
Quoted 1 line · Ye Bin
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I can't take patches without any changelog text, sorry.

Still taking patches for fsl_udc_core.c ?
I figured this driver was obsolete and should be moved to one of the Chipidea drivers.

Nobody sent any patches to switch over the users of this driver to chipidea. I would love to delete this driver :-)

Me too, I got a few local patches here as the driver is quite buggy. Got to little USB knowledge to switch it over though :(

Jocke

#5 lore raw
Quoted 10 lines · Joakim Tjernlund
Quoted 9 lines · Felipe Balbi
Quoted 7 lines · Joakim Tjernlund
Quoted 5 lines · Greg KH
Quoted 1 line · Ye Bin

I can't take patches without any changelog text, sorry.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Still taking patches for fsl_udc_core.c ?
I figured this driver was obsolete and should be moved to one of the Chipidea drivers.

Nobody sent any patches to switch over the users of this driver to chipidea. I would love to delete this driver :-)

Me too, I got a few local patches here as the driver is quite buggy. Got to little USB knowledge to switch it over though :(

this wouldn't require USB knowledge. It only requires some minor DTS knowledge and HW for testing.

Signature · 1 line
balbi
#6 lore raw
Quoted 10 lines · On Tue, 2020-08-25 at 11:53 +0300, Felipe Balbi wrote: Joakim Tjernlund…
Quoted 9 lines · Felipe Balbi
Quoted 7 lines · Joakim Tjernlund <[email protected]<mailto:Joakim.Tjernlund@infiner…
Quoted 5 lines · Greg KH
Quoted 1 line · Ye Bin

I can't take patches without any changelog text, sorry.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Still taking patches for fsl_udc_core.c ?
I figured this driver was obsolete and should be moved to one of the Chipidea drivers.

Nobody sent any patches to switch over the users of this driver to chipidea. I would love to delete this driver :-)

Me too, I got a few local patches here as the driver is quite buggy. Got to little USB knowledge to switch it over though :(

this wouldn't require USB knowledge. It only requires some minor DTS knowledge and HW for testing.

hmm, OK. If it is that simple I may take a crack at it(but then why hasn't NXP already done that ?) I would need some guidance as to what the involved files are?

Jocke