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: ed229454856e ("power: supply: axp288-charger: Optimize register reading method")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Wei Yongjun 2021-10-13 09:31:15 +00:00 committed by Sebastian Reichel
parent e660dbb68c
commit db6e436264

View File

@ -865,6 +865,7 @@ static int axp288_charger_probe(struct platform_device *pdev)
if (!info)
return -ENOMEM;
mutex_init(&info->lock);
info->pdev = pdev;
info->regmap = axp20x->regmap;
info->regmap_irqc = axp20x->regmap_irqc;