RE: [PATCH] Buglet in Alchemy OHCI driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx
[mailto:linux-mips-bounce@xxxxxxxxxxxxxx] On Behalf Of Greg KH
Sent: 01 March 2006 23:22
To: Martin Michlmayr
Cc: Jordan Crouse; linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx;
linux-mips@xxxxxxxxxxxxxx; gregkh@xxxxxxx
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@xxxxxxx> [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@xxxxxxx>
> 
> 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@xxxxxxx>
> Signed-off-by: Martin Michlmayr <tbm@xxxxxxxxxx>

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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux