summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c0ea8d013a..5624552c00 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -30,6 +30,7 @@
#include <of.h>
#include <usb/ehci.h>
#include <asm/mmu.h>
+#include <linux/err.h>
#include "ehci.h"
@@ -924,6 +925,9 @@ static int ehci_probe(struct device_d *dev)
data.flags = EHCI_HAS_TT;
data.hccr = dev_request_mem_region(dev, 0);
+ if (IS_ERR(data.hccr))
+ return PTR_ERR(data.hccr);
+
if (dev->num_resources > 1)
data.hcor = dev_request_mem_region(dev, 1);
else