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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;