summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-isp1301.c
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2013-05-10 11:45:08 +0200
committerFelipe Balbi <balbi@ti.com>2013-05-15 16:32:47 +0200
commit1abd8b3172b701ed626df4ebf09b7fe7f329888a (patch)
treee5edc969a6f01954507c3cf7224efa64e6f52f0d /drivers/usb/phy/phy-isp1301.c
parentusb: phy: don't check resource with devm_ioremap_resource (diff)
downloadlinux-1abd8b3172b701ed626df4ebf09b7fe7f329888a.tar.xz
linux-1abd8b3172b701ed626df4ebf09b7fe7f329888a.zip
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 <robert.jarzmik@free.fr> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-isp1301.c')
-rw-r--r--drivers/usb/phy/phy-isp1301.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-isp1301.c b/drivers/usb/phy/phy-isp1301.c
index 225ae6c97eeb..8a55b37d1a02 100644
--- a/drivers/usb/phy/phy-isp1301.c
+++ b/drivers/usb/phy/phy-isp1301.c
@@ -102,6 +102,7 @@ static int isp1301_probe(struct i2c_client *client,
mutex_init(&isp->mutex);
phy = &isp->phy;
+ phy->dev = &client->dev;
phy->label = DRV_NAME;
phy->init = isp1301_phy_init;
phy->set_vbus = isp1301_phy_set_vbus;