]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.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)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 8 Nov 2016 16:46:24 +0000 (16:46 +0000)
commitc12a2390bcfaff69d6af946770a09fdd0d6f0406
treed0a8458f997ebdb82be49f9379c4f8ea783746bb
parent1fae75366846513bdcf87bfcfb3d64043196b281
power: bq24257: Fix use of uninitialized pointer bq->charger

BugLink: http://bugs.launchpad.net/bugs/1638267
commit 0610735928ee47870e083d5901caa371089216f1 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/power/bq24257_charger.c