Re: [PATCH] power: supply: cpcap-battery: fix invalid usage of list cursor

2021-04-20 Thread Sebastian Reichel
[+Cc Tony] Hi, On Wed, Apr 14, 2021 at 02:47:24PM +0800, zhuguangqin...@gmail.com wrote: > From: Guangqing Zhu > > Fix invalid usage of a list_for_each_entry in cpcap_battery_irq_thread(). > When list is empty or if the list is completely traversed (without breaking > from the loop on one of the

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

2021-04-13 Thread zhuguangqing83
From: Guangqing Zhu Fix invalid usage of a list_for_each_entry in cpcap_battery_irq_thread(). When list is empty or if the list is completely traversed (without breaking from the loop on one of the entries) then the list cursor does not point to a valid entry and therefore should not be used. "if