diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-26 10:48:39 -0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 08:09:45 -0400 |
commit | ec57fcd042a9448096705847290d4e4e97fbb7e1 (patch) | |
tree | 4c15ed11d9652991c43ca3415a8d1390c7dd792b /drivers/usb | |
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/usb')
-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) | |||
140 | (rev >> 4) & 0xf, rev & 0xf, config->extcon, otg_dev->id, | 140 | (rev >> 4) & 0xf, rev & 0xf, config->extcon, otg_dev->id, |
141 | otg_dev->vbus); | 141 | otg_dev->vbus); |
142 | 142 | ||
143 | platform_set_drvdata(pdev, otg_dev); | ||
144 | |||
143 | return 0; | 145 | return 0; |
144 | } | 146 | } |
145 | 147 | ||