Skip to content
Commit d0a43c12 authored by Guangqing Zhu's avatar Guangqing Zhu Committed by Sebastian Reichel
Browse files

power: supply: cpcap-battery: fix invalid usage of list cursor



Fix invalid usage of a list_for_each_entry in cpcap_battery_irq_thread().
Empty list or fully traversed list points to list head, which is not
NULL (and before the first element containing real data).

Signed-off-by: default avatarGuangqing Zhu <zhuguangqing83@gmail.com>
Reviewed-by: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarCarl Philipp Klemm <philipp@uvos.xyz>
Tested-by: default avatarCarl Philipp Klemm <philipp@uvos.xyz>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 43d87663
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment