mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
power_supply: tps65217-charger: fix missing platform_set_drvdata()
Add missing platform_set_drvdata() in tps65217_charger_probe(), otherwise
calling platform_get_drvdata() in remove returns NULL.
This is detected by Coccinelle semantic patch.
Fixes: 3636859b28
("power_supply: Add support for tps65217-charger")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
This commit is contained in:
parent
bae170efd6
commit
33e7664a0a
@ -206,6 +206,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)
|
||||
if (!charger)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, charger);
|
||||
charger->tps = tps;
|
||||
charger->dev = &pdev->dev;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user