summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-arc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-arc.c')
-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 080ba06b89b4..59a2f4bd2a20 100755
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -316,7 +316,7 @@ err2:
err1:
dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), retval);
fsl_usb_lowpower_mode(pdata, true);
- if (pdata->exit)
+ if (pdata->exit && pdata->pdev)
pdata->exit(pdata->pdev);
return retval;
}
@@ -379,7 +379,7 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
/*
* do platform specific un-initialization
*/
- if (pdata->exit)
+ if (pdata->exit && pdata->pdev)
pdata->exit(pdata->pdev);
}