]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: core: Break capacity loop
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 14 Nov 2021 23:12:07 +0000 (00:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jan 2022 14:23:32 +0000 (15:23 +0100)
commit159eaafee69b2b365c0cf59b5936dea771b62f2f
tree82adea9230cacb70fd8ecdee56330ae2a84495bb
parent102af6edfd3a372db6e229177762a91f552e5f5e
power: supply: core: Break capacity loop

commit 51c7b6a0398f54b9120795796a4cff4fc9634f7d upstream.

We should not go on looking for more capacity tables after
we realize we have looked at the last one in
power_supply_find_ocv2cap_table().

Fixes: 3afb50d7125b ("power: supply: core: Add some helpers to use the battery OCV capacity table")
Cc: Chunyan Zhang <chunyan.zhang@unisoc.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/supply/power_supply_core.c