aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorZhang Qilong <[email protected]>2022-11-21 09:18:31 +0800
committerSebastian Reichel <[email protected]>2022-11-24 22:46:06 +0100
commit955bee204f3dd307642c101b75e370662987e735 (patch)
tree93f862f409204f0dd720599b8027a7842984e463 /lib/mpi/mpi-mod.c
parent922bde5a095540fe3870245e4f0b625a20967ea4 (diff)
power: supply: z2_battery: Fix possible memleak in z2_batt_probe()
If devm_gpiod_get_optional() returns error, the charger should be freed before z2_batt_probe returns according to the context. We fix it by just gotoing to 'err' branch. Fixes: a3b4388ea19b ("power: supply: z2_battery: Convert to GPIO descriptors") Signed-off-by: Zhang Qilong <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions