linux-mips
[Top] [All Lists]

Re: [PATCH] Buglet in Alchemy OHCI driver

To: Jordan Crouse <jordan.crouse@amd.com>
Subject: Re: [PATCH] Buglet in Alchemy OHCI driver
From: Martin Michlmayr <tbm@cyrius.com>
Date: Wed, 1 Mar 2006 18:37:35 +0000
Cc: linux-usb-devel@lists.sourceforge.net, linux-mips@linux-mips.org, gregkh@suse.de
In-reply-to: <20060301183026.GL31957@cosmic.amd.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060301183026.GL31957@cosmic.amd.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11
* 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>

---

 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");

-- 
Martin Michlmayr
http://www.cyrius.com/

<Prev in Thread] Current Thread [Next in Thread>