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:
Wei Yongjun 2016-07-26 14:49:04 +00:00 committed by Sebastian Reichel
parent bae170efd6
commit 33e7664a0a
1 changed files with 1 additions and 0 deletions

View File

@ -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;