diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-26 14:47:00 +0000 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 15:09:45 +0300 |
commit | 4c4f106c032ff32b89c98a4d819e68e6e643c14e (patch) | |
tree | 0ab2197847c57980b3a94a515e75809c4a4ce9a4 /drivers | |
parent | ec57fcd042a9448096705847290d4e4e97fbb7e1 (diff) |
usb: dwc3: fix missing platform_set_drvdata() in dwc3_of_simple_probe()
Add missing platform_set_drvdata() in dwc3_of_simple_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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc3/dwc3-of-simple.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index 974335377d9f..e56d59b19a0e 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -61,6 +61,7 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) if (!simple->clks) return -ENOMEM; + platform_set_drvdata(pdev, simple); simple->dev = dev; for (i = 0; i < simple->num_clocks; i++) { |