Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Felipe Balbi
ec57fcd0 cee51c33

+2
+2
drivers/usb/phy/phy-omap-otg.c
··· 140 140 (rev >> 4) & 0xf, rev & 0xf, config->extcon, otg_dev->id, 141 141 otg_dev->vbus); 142 142 143 + platform_set_drvdata(pdev, otg_dev); 144 + 143 145 return 0; 144 146 } 145 147