All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] Buglet in Alchemy OHCI driver
@ 2006-03-07 12:17 ` Hamilton, Ian
  0 siblings, 0 replies; 9+ messages in thread
From: Hamilton, Ian @ 2006-03-07 12:17 UTC (permalink / raw)
  To: Greg KH, Martin Michlmayr
  Cc: Jordan Crouse, linux-usb-devel, linux-mips, gregkh

Hi Greg,

I spotted this in the current latest version of ohci-au1xxx.c (accessed
via git web interface):

94
95 		if (dev->resource[1].flags != IORESOURCE_IRQ) {
96 		pr_debug ("resource[1] is not IORESOURCE_IRQ");
97 		retval -ENOMEM;
98 	}
99  

instead this from Martin's patch:

diff --git a/drivers/usb/host/ohci-au1xxx.c
b/drivers/usb/host/ohci-au1xxx.c
index aa4d0cd..d8fb1bb 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -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;
        }

Line 97 produces a warning, but doesn't stop the build, so may have been
missed.

Cheers,
Ian Hamilton.

-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Greg KH
Sent: 01 March 2006 23:22
To: Martin Michlmayr
Cc: Jordan Crouse; linux-usb-devel@lists.sourceforge.net;
linux-mips@linux-mips.org; gregkh@suse.de
Subject: Re: [PATCH] Buglet in Alchemy OHCI driver

On Wed, Mar 01, 2006 at 06:37:35PM +0000, Martin Michlmayr wrote:
> * Jordan Crouse <jordan.crouse@amd.com> [2006-03-01 11:30]:
> > 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 <jordan.crouse@amd.com>
> 
> Failure to get the right resources should immediately return.  Current
> code has the possiblity of running off into the weeds. Spotted by
> Martin Michlmayr.
> 
> Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
> Signed-off-by: Martin Michlmayr <tbm@cyrius.com>

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] Buglet in Alchemy OHCI driver
@ 2006-03-01 18:30 Jordan Crouse
  2006-03-01 18:37 ` Martin Michlmayr
  2006-03-02 15:33 ` Ralf Baechle
  0 siblings, 2 replies; 9+ messages in thread
From: Jordan Crouse @ 2006-03-01 18:30 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: linux-mips, gregkh, tbm

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

Martin Michlmayr spotted this potentially serious bug.  Please apply.

Jordan

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

[-- Attachment #2: ohci-fix.patch --]
[-- Type: text/plain, Size: 827 bytes --]

[PATCH] Buglet in Alchemy OCHI

From: Jordan Crouse <jordan.crouse@amd.com>

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

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
---

 drivers/usb/host/ohci-au1xxx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index aa4d0cd..d8fb1bb 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -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");

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

end of thread, other threads:[~2006-03-07 18:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 12:17 [PATCH] Buglet in Alchemy OHCI driver Hamilton, Ian
2006-03-07 12:17 ` Hamilton, Ian
2006-03-07 16:54 ` Greg KH
2006-03-07 18:28   ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2006-03-01 18:30 Jordan Crouse
2006-03-01 18:37 ` Martin Michlmayr
2006-03-01 23:21   ` Greg KH
2006-03-02 15:33 ` Ralf Baechle
2006-03-02 16:28   ` Greg KH

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.