diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-26 16:48:39 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 14:09:45 +0200 |
commit | ec57fcd042a9448096705847290d4e4e97fbb7e1 (patch) | |
tree | 4c15ed11d9652991c43ca3415a8d1390c7dd792b | |
parent | usb: gadget: configfs: add mutex lock before unregister gadget (diff) | |
download | linux-ec57fcd042a9448096705847290d4e4e97fbb7e1.tar.xz linux-ec57fcd042a9448096705847290d4e4e97fbb7e1.zip |
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.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; } |