summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-07-26 14:48:39 +0000
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-11 15:09:45 +0300
commitec57fcd042a9448096705847290d4e4e97fbb7e1 (patch)
tree4c15ed11d9652991c43ca3415a8d1390c7dd792b
parentcee51c33f52ebf673a088a428ac0fecc33ab77fa (diff)
downloadop-kernel-dev-ec57fcd042a9448096705847290d4e4e97fbb7e1.zip
op-kernel-dev-ec57fcd042a9448096705847290d4e4e97fbb7e1.tar.gz
usb: phy: omap-otg: Fix missing platform_set_drvdata() in omap_otg_probe()
Add missing platform_set_drvdata() in omap_otg_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r--drivers/usb/phy/phy-omap-otg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c
index 6f6d2a7..6523af4 100644
--- a/drivers/usb/phy/phy-omap-otg.c
+++ b/drivers/usb/phy/phy-omap-otg.c
@@ -140,6 +140,8 @@ static int omap_otg_probe(struct platform_device *pdev)
(rev >> 4) & 0xf, rev & 0xf, config->extcon, otg_dev->id,
otg_dev->vbus);
+ platform_set_drvdata(pdev, otg_dev);
+
return 0;
}
OpenPOWER on IntegriCloud