Commit 02bf586
Al Stone
power: supply: core: Initialize struct to zero
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071846
Tested: This is one of a series of patch sets to enable Arm SystemReady IR
support in the kernel for NXP i.MX8 platforms. This set updates the
power subsystem. This set has been tested via simple boot tests and
the CI loop.
commit e56a4be
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Mon Apr 25 00:13:01 2022 +0200
power: supply: core: Initialize struct to zero
As we rely on pointers in the battery info to be zero-initialized
such as in the helper function power_supply_supports_vbat2ri()
we certainly need to allocate the struct power_supply_battery_info
with kzalloc() as well. Else this happens:
Unable to handle kernel paging request at virtual address 00280000
(...)
PC is at power_supply_vbat2ri+0x50/0x12c
LR is at ab8500_fg_battery_resistance+0x34/0x108
Fixes: e9e7d16 ("power: supply: Support VBAT-to-Ri lookup tables")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit e56a4be)
Signed-off-by: Al Stone <ahs3@redhat.com>1 parent e4c7664 commit 02bf586
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| |||
0 commit comments