]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: iwlwifi: fix aux ROC time event iterator usage
authorJunjie Cao <junjie.cao@intel.com>
Thu, 16 Oct 2025 01:49:19 +0000 (09:49 +0800)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 12 Nov 2025 07:54:46 +0000 (09:54 +0200)
commitf4c737d44969c38dac2478039d353edddffd120d
treec641bd22f3530ce0d69d7ad351264fdaab7e9f77
parentc4e1ac09ee1c750890e36cb1f841f25518f23589
wifi: iwlwifi: fix aux ROC time event iterator usage

The list_for_each_entry() iterator must not be used outside the loop.
Even though we break and check for NULL, doing so still violates kernel
iteration rules and triggers Coccinelle's use_after_iter.cocci warning.

Cache the matched entry in aux_roc_te and use it consistently after the
loop. This follows iterator best practices, resolves the warning, and
makes the code more maintainable.

Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Link: https://patch.msgid.link/20251016014919.383565-1-junjie.cao@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c