Skip to contentSkip to conversation

Buglet in Alchemy OHCI driver

PATCH In review Jordan Crouse 5 participants 5 messages Mar 1, 2006 – Mar 2, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Buglet in Alchemy OHCI driver

Martin Michlmayr spotted this potentially serious bug. Please apply.

Jordan

Signature · 4 lines
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>

[PATCH] Buglet in Alchemy OCHI

From: Jordan Crouse <[email protected]>

Failure to get the right resources should immediately return. Current code has the possiblity of running off into the weeds. Spotted by Martin Michlmayr.

---

 drivers/usb/host/ohci-au1xxx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ohci-au1xxx.c +1 -1
index aa4d0cd..d8fb1bb 100644
@@ -94,7 +94,7 @@ int usb_hcd_au1xxx_probe (const struct h
 
 	if (dev->resource[1].flags != IORESOURCE_IRQ) {
 		pr_debug ("resource[1] is not IORESOURCE_IRQ");
-		retval = -ENOMEM;
+		return -ENOMEM;
 	}
 
 	hcd = usb_create_hcd(driver, &dev->dev, "Au1xxx");
#1 lore raw
Quoted 1 line · Jordan Crouse

Martin Michlmayr spotted this potentially serious bug. Please apply.

Please don't send patches as MIME attachments. Here it is again (with a better summary too):

[PATCH] Alchemy OCHI: return if right resources cannot be obtained

From: Jordan Crouse <[email protected]>

Failure to get the right resources should immediately return. Current code has the possiblity of running off into the weeds. Spotted by Martin Michlmayr.

---

 drivers/usb/host/ohci-au1xxx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ohci-au1xxx.c +1 -1
index aa4d0cd..d8fb1bb 100644
@@ -94,7 +94,7 @@ int usb_hcd_au1xxx_probe (const struct h
 
 	if (dev->resource[1].flags != IORESOURCE_IRQ) {
 		pr_debug ("resource[1] is not IORESOURCE_IRQ");
-		retval = -ENOMEM;
+		return -ENOMEM;
 	}
 
 	hcd = usb_create_hcd(driver, &dev->dev, "Au1xxx");
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#2 lore raw
Quoted 9 lines · Martin Michlmayr
Quoted 1 line · Jordan Crouse

Martin Michlmayr spotted this potentially serious bug. Please apply.

Please don't send patches as MIME attachments. Here it is again (with a better summary too):

[PATCH] Alchemy OCHI: return if right resources cannot be obtained

Quoted 8 lines

From: Jordan Crouse <[email protected]>

Failure to get the right resources should immediately return. Current code has the possiblity of running off into the weeds. Spotted by Martin Michlmayr.

This patch is already in my tree, in the other patch from Jordan, so it will make it in after 2.6.16-final is out.

thanks,

greg k-h

#3 lore raw
In reply to Jordan Crouse
Quoted 9 lines · Jordan Crouse

Date: Wed, 1 Mar 2006 11:30:26 -0700
From: "Jordan Crouse" <[email protected]>
To: [email protected]
cc: [email protected], [email protected], [email protected]
Subject: [PATCH] Buglet in Alchemy OHCI driver
Content-Type: multipart/mixed;
boundary=5vNYLRcllDrimb99

Martin Michlmayr spotted this potentially serious bug. Please apply.

Ehh... This problem doesn't exist on kernel.org. Greg, can you ignore this one, please?

Ralf

#4 lore raw
Quoted 9 lines · Ralf Baechle
Quoted 8 lines · Jordan Crouse

Date: Wed, 1 Mar 2006 11:30:26 -0700
From: "Jordan Crouse" <[email protected]>
To: [email protected]
cc: [email protected], [email protected], [email protected]
Subject: [PATCH] Buglet in Alchemy OHCI driver
Content-Type: multipart/mixed;
boundary=5vNYLRcllDrimb99

Quoted 4 lines
Quoted 1 line

Martin Michlmayr spotted this potentially serious bug. Please apply.

Ehh... This problem doesn't exist on kernel.org. Greg, can you ignore this one, please?

Consider it ignored :)

thanks,

greg k-h