mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
watchdog: gpio_wdt: Fix missing platform_set_drvdata() in gpio_wdt_probe()
Add missing platform_set_drvdata() in gpio_wdt_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
This commit is contained in:
parent
3c10bbde10
commit
1ac0656343
1 changed files with 2 additions and 0 deletions
|
|
@ -151,6 +151,8 @@ static int gpio_wdt_probe(struct platform_device *pdev)
|
|||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
priv->gpio = of_get_gpio_flags(pdev->dev.of_node, 0, &flags);
|
||||
if (!gpio_is_valid(priv->gpio))
|
||||
return priv->gpio;
|
||||
|
|
|
|||
Loading…
Reference in a new issue