]> git.karo-electronics.de Git - linux-beck.git/commit
power: bq24257: Fix use of uninitialized pointer bq->charger
authorGeorges Savoundararadj <savoundg@gmail.com>
Thu, 8 Sep 2016 01:38:15 +0000 (18:38 -0700)
committerSebastian Reichel <sre@kernel.org>
Mon, 19 Sep 2016 18:56:22 +0000 (20:56 +0200)
commit0610735928ee47870e083d5901caa371089216f1
treeeb5798b6c09efd4bd5012b3990cf7d4e94780fae
parent9edeaada19a21eb669ae0dfe749be88f1810ea92
power: bq24257: Fix use of uninitialized pointer bq->charger

bq->charger is initialized in bq24257_power_supply_init.
Therefore, bq24257_power_supply_init should be called before the
registration of the IRQ handler bq24257_irq_handler_thread that calls
power_supply_changed(bq->charger).

Signed-off-by: Georges Savoundararadj <savoundg@gmail.com>
Cc: Aurelien Chanot <chanot.a@gmail.com>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Fixes: 2219a935963e ("power_supply: Add TI BQ24257 charger driver")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/bq24257_charger.c