From 1abd8b3172b701ed626df4ebf09b7fe7f329888a Mon Sep 17 00:00:00 2001 From: Robert Jarzmik Date: Fri, 10 May 2013 15:15:08 +0530 Subject: usb: phy: Fix NULL pointer exception during usb_get_phy Upon initialisation (driver probe) a NULL pointer exception is triggered. This is due to lack of initialisation of device field in phy structure, which is used by phy framework in usb_get_phy(). Fix it by initialising the device field. Signed-off-by: Robert Jarzmik Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-fsl-usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/phy/phy-fsl-usb.c') diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index 97b9308507c3..e771bafb9f1d 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -799,6 +799,7 @@ static int fsl_otg_conf(struct platform_device *pdev) /* initialize the otg structure */ fsl_otg_tc->phy.label = DRIVER_DESC; + fsl_otg_tc->phy.dev = &pdev->dev; fsl_otg_tc->phy.set_power = fsl_otg_set_power; fsl_otg_tc->phy.otg->phy = &fsl_otg_tc->phy; -- cgit v1.2.3