Commit db6e4362 authored by Wei Yongjun's avatar Wei Yongjun Committed by Sebastian Reichel

power: supply: axp288_charger: Fix missing mutex_init()

The driver allocates the mutex but not initialize it.
Use mutex_init() on it to initialize it correctly.

Fixes: ed229454 ("power: supply: axp288-charger: Optimize register reading method")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent e660dbb6
...@@ -865,6 +865,7 @@ static int axp288_charger_probe(struct platform_device *pdev) ...@@ -865,6 +865,7 @@ static int axp288_charger_probe(struct platform_device *pdev)
if (!info) if (!info)
return -ENOMEM; return -ENOMEM;
mutex_init(&info->lock);
info->pdev = pdev; info->pdev = pdev;
info->regmap = axp20x->regmap; info->regmap = axp20x->regmap;
info->regmap_irqc = axp20x->regmap_irqc; info->regmap_irqc = axp20x->regmap_irqc;
......
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