Commit 7b41a234 authored by Sebastian Reichel's avatar Sebastian Reichel
Browse files

power: supply: core: fix static checker warning



static checker complains, that the block already breaks if IS_ERR(np)
and thus the extra !IS_ERR(np) check in the while condition is
superfluous. Avoid the extra check by using while(true) instead. This
should not change the runtime behavior at all and I expect the binary
to be more or less the same for an optimizing compiler.

Fixes: f368f87b ("power: supply: core: convert to fwnnode")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-pm/285c9c39-482c-480c-8b0b-07111e39fdfe@sabinyo.mountain/


Reviewed-by: default avatarHans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250707-fix-psy-static-checker-warning-v1-1-42d555c2b68a@collabora.com


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent f9335bb4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment