提交 33e7664a 编写于 作者: W Wei Yongjun 提交者: Sebastian Reichel

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: 3636859b ("power_supply: Add support for tps65217-charger")
Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 bae170ef
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册