diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c index c79eea2bf25cff..e2000bd2e635bb 100755 --- a/drivers/usb/host/ehci-arc.c +++ b/drivers/usb/host/ehci-arc.c @@ -315,7 +315,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, 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);