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>
This commit is contained in:
Wei Yongjun 2016-07-26 14:48:39 +00:00 committed by Felipe Balbi
parent cee51c33f5
commit ec57fcd042
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}