From: Wei Yongjun Date: Tue, 26 Jul 2016 14:48:39 +0000 (+0000) Subject: usb: phy: omap-otg: Fix missing platform_set_drvdata() in omap_otg_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec57fcd042a9448096705847290d4e4e97fbb7e1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Felipe Balbi --- 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; }