aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorDavid Vrabel <dvrabel@arcom.com>2006-01-19 12:56:29 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 16:42:57 -0500
commit489447380a2921ec0e9154f773c44ab3167ede4b (patch)
tree10edc2bca15765dae7699b8d26cf3d828869bc3c /drivers/usb/host
parent305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 (diff)
[PATCH] handle errors returned by platform_get_irq*()
platform_get_irq*() now returns on -ENXIO when the resource cannot be found. Ensure all users of platform_get_irq*() handle this error appropriately. Signed-off-by: David Vrabel <dvrabel@arcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-omap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 3785b3f7df1b..ca19abe01c53 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -286,7 +286,7 @@ void usb_hcd_omap_remove (struct usb_hcd *, struct platform_device *);
286int usb_hcd_omap_probe (const struct hc_driver *driver, 286int usb_hcd_omap_probe (const struct hc_driver *driver,
287 struct platform_device *pdev) 287 struct platform_device *pdev)
288{ 288{
289 int retval; 289 int retval, irq;
290 struct usb_hcd *hcd = 0; 290 struct usb_hcd *hcd = 0;
291 struct ohci_hcd *ohci; 291 struct ohci_hcd *ohci;
292 292
@@ -329,7 +329,12 @@ int usb_hcd_omap_probe (const struct hc_driver *driver,
329 if (retval < 0) 329 if (retval < 0)
330 goto err2; 330 goto err2;
331 331
332 retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), SA_INTERRUPT); 332 irq = platform_get_irq(pdev, 0);
333 if (irq < 0) {
334 retval = -ENXIO;
335 goto err2;
336 }
337 retval = usb_add_hcd(hcd, irq, SA_INTERRUPT);
333 if (retval == 0) 338 if (retval == 0)
334 return retval; 339 return retval;
335 340