summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-sm501.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-sm501.c')
-rw-r--r--drivers/usb/host/ohci-sm501.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index ab1e366..54b6ac2 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -199,7 +199,8 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
usb_put_hcd(hcd);
dma_release_declared_memory(&pdev->dev);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- release_mem_region(mem->start, mem->end - mem->start + 1);
+ if (mem)
+ release_mem_region(mem->start, mem->end - mem->start + 1);
/* mask interrupts and disable power */
OpenPOWER on IntegriCloud