Commit ed3bab52 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

power_supply: tps65217-charger: fix missing platform_set_drvdata()

commit 33e7664a upstream.

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: 3636859b ("power_supply: Add support for tps65217-charger")
Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 630acdbb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment