power: supply: wm97xx: Fix NULL pointer dereference in power_supply_changed()
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | power: supply: wm97xx: Fix NULL pointer dereference in power_supply_changed()drivers/ | +19 | 0 replies | |
| 2/3 | power: supply: wm97xx: Use devm_power_supply_register()drivers/ | +2 | 2 replies | |
| 3/3 | power: supply: wm97xx: Use devm_kcalloc()drivers/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] power: supply: wm97xx: Fix NULL pointer dereference in power_supply_changed()
The majority of the drivers in drivers/power/supply/ do the right thing when registering an interrupt handler and the power_supply handle; namely making sure that the interrupt handler only runs while the power_supply handle is valid. This driver requests the IRQ a little too soon, and this can lead to a nasty NULL pointer dereference as thoroughly explained in the commit message. This patch series also contains some other related clean-ups that makes life a little easier.
This issue was found when writing a new driver for the upcoming TI BQ25630 [1]. Patch adding support for that one will be sent as soon as TI releases the datasheet publicly, which should be anytime soon...
[1] https://www.ti.com/product/BQ25630
Waqar Hameed (3):
power: supply: wm97xx: Fix NULL pointer dereference in
power_supply_changed()
power: supply: wm97xx: Use devm_power_supply_register()
power: supply: wm97xx: Use devm_kcalloc()
drivers/power/supply/wm97xx_battery.c | 40 ++++++++++----------------- 1 file changed, 15 insertions(+), 25 deletions(-)
base-commit: fa084c35afa13ab07a860ef0936cd987f9aa0460
Signature · 1 line
2.39.5