summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdrivers/usb/host/ehci-arc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index c79eea2bf25c..e2000bd2e635 100755
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -315,7 +315,7 @@ err2:
usb_put_hcd(hcd);
err1:
dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), retval);
- if (pdata->exit)
+ if (pdata->exit && pdata->pdev)
pdata->exit(pdata->pdev);
return retval;
}
@@ -373,7 +373,7 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
* do platform specific un-initialization:
* release iomux pins clocks, etc.
*/
- if (pdata->exit)
+ if (pdata->exit && pdata->pdev)
pdata->exit(pdata->pdev);
iounmap(hcd->regs);