diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-26 14:48:39 +0000 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 15:09:45 +0300 |
commit | ec57fcd042a9448096705847290d4e4e97fbb7e1 (patch) | |
tree | 4c15ed11d9652991c43ca3415a8d1390c7dd792b /drivers | |
parent | cee51c33f52ebf673a088a428ac0fecc33ab77fa (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/phy/phy-omap-otg.c | 2 |
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 6f6d2a7fd5a0..6523af4f8f93 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; } |