Message ID | 1469544544-31749-1-git-send-email-weiyj.lk@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Hi, On Tue, Jul 26, 2016 at 02:49:04PM +0000, Wei Yongjun wrote: > 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. > > Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Thanks, queued into power-supply's -fixes branch. -- Sebastian
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c index 73dfae4..4c56e54 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;
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. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> --- drivers/power/tps65217_charger.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html