diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-26 14:49:04 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-30 10:12:47 +0200 |
commit | ed3bab5299d8f82cfae121e8cda2a3a7083f396b (patch) | |
tree | 66aa87e24babe42100113ca91beed92d03b95ade /drivers | |
parent | 630acdbb7bbccb9b9e20178909d1dc285739ef0b (diff) | |
download | linux-stable-ed3bab5299d8f82cfae121e8cda2a3a7083f396b.tar.gz linux-stable-ed3bab5299d8f82cfae121e8cda2a3a7083f396b.tar.bz2 linux-stable-ed3bab5299d8f82cfae121e8cda2a3a7083f396b.zip |
power_supply: tps65217-charger: fix missing platform_set_drvdata()
commit 33e7664a0af6e9a516f01014f39737aaa119b6d9 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: 3636859b280c ("power_supply: Add support for tps65217-charger")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/tps65217_charger.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c index 73dfae41def8..4c56e54af6ac 100644 --- a/drivers/power/tps65217_charger.c +++ b/drivers/power/tps65217_charger.c @@ -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; |