Files
linux/drivers
Hans de Goede a7b2947649 power: supply: bq27xxx: Fix kernel crash on IRQ handler register error
[ Upstream commit cdf10ffe8f ]

When registering the IRQ handler fails, do not just return the error code,
this will free the devm_kzalloc()-ed data struct while leaving the queued
work queued and the registered power_supply registered with both of them
now pointing to free-ed memory, resulting in various kernel crashes
soon afterwards.

Instead properly tear-down things on IRQ handler register errors.

Fixes: 703df6c097 ("power: bq27xxx_battery: Reorganize I2C into a module")
Cc: Andrew F. Davis <afd@ti.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-17 09:48:44 +01:00
..
2021-11-17 09:48:23 +01:00
2021-07-14 16:53:42 +02:00
2021-10-20 11:40:15 +02:00
2021-11-17 09:48:20 +01:00
2021-09-26 14:07:14 +02:00