diff options
author | jonghyun26.kim <jonghyun26.kim@lge.com> | 2017-07-24 15:39:48 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-12-23 23:43:35 +0200 |
commit | 1b2d561c1e56f8bb348f0ae30a1e4477a21a84e5 (patch) | |
tree | 708f805c65aa2288d868f33a7b46311230b56fa0 /kernel/irq/pm.c | |
parent | 522411c567b9cfe07ff3c140155293dbdd005567 (diff) |
power_supply: Fix unbalanced the power supplies
If a driver invokes multiple power_supply_register(), the each supply
will not be saved in the supplied_from[] with the correct index.
supplied_from[0] = "dc"
num_supplies = 1;
supplied_from[0] = "usb"
num_supplies = 2;
supplied_from[0] = "battery"
num_supplies = 3;
...
It results in NPE when iterating the supplied_from[] with num_supplies on
__power_supply_is_supplied_by()
Bug: 63785418
Change-Id: Ifd14ca7c6e2df247e1090e4fa8d8c66bd2912180
Signed-off-by; Devin Kim <dojip.kim@lge.com>
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Diffstat (limited to 'kernel/irq/pm.c')
0 files changed, 0 insertions, 0 deletions