Explorar o código

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>
Wei Yongjun %!s(int64=9) %!d(string=hai) anos
pai
achega
ec57fcd042
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/usb/phy/phy-omap-otg.c

+ 2 - 0
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;
 }