linux-stable/drivers/misc/mei
Alexander Usyskin c10187b1c5 mei: avoid iterator usage outside of list_for_each_entry
Usage of the iterator outside of the list_for_each_entry
is considered harmful. https://lkml.org/lkml/2022/2/17/1032

Do not reference the loop variable outside of the loop,
by rearranging the orders of execution.
Instead of performing search loop and checking outside the loop
if the end of the list was hit and no matching element was found,
the execution is performed inside the loop upon a successful match
followed by a goto statement to the next step,
therefore no condition has to be performed after the loop has ended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20220308095926.300412-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-18 13:48:30 +01:00
..
hdcp mei: hdcp: SPDX tag should be the first line 2021-06-15 17:12:58 +02:00
pxp mei: pxp: export pavp client to me client bus 2021-10-04 13:10:17 -04:00
bus-fixup.c mei: fix kdoc in the driver 2021-06-22 12:40:31 +02:00
bus.c mei: bus: add client dma interface 2021-11-26 18:31:46 +02:00
client.c mei: me: avoid link reset on shutdown 2022-02-25 12:14:01 +01:00
client.h mei: constify passed buffers and structures 2021-07-29 17:08:04 +02:00
debugfs.c mei: add support for client dma capability 2021-02-06 15:48:11 +01:00
dma-ring.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hbm.c mei: hbm: fix client dma reply status 2021-12-30 14:12:16 +01:00
hbm.h mei: implement client dma setup. 2021-02-06 15:48:11 +01:00
hw-me-regs.h mei: me: add Alder Lake N device id. 2022-03-18 13:48:16 +01:00
hw-me.c mei: me: fix reset policy on read error in interrupt 2022-02-25 12:14:01 +01:00
hw-me.h mei: add device kind to sysfs 2020-07-29 16:21:13 +02:00
hw-txe-regs.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw-txe.c mei: Remove some dead code 2021-12-03 14:26:33 +01:00
hw-txe.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw.h mei: bus: add client dma interface 2021-11-26 18:31:46 +02:00
init.c mei: do not overwrite state on hw start 2022-02-25 12:14:01 +01:00
interrupt.c mei: avoid iterator usage outside of list_for_each_entry 2022-03-18 13:48:30 +01:00
Kconfig mei: pxp: export pavp client to me client bus 2021-10-04 13:10:17 -04:00
main.c mei: fix kdoc in the driver 2021-06-22 12:40:31 +02:00
Makefile mei: pxp: export pavp client to me client bus 2021-10-04 13:10:17 -04:00
mei-trace.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei-trace.h treewide: Add missing semicolons to __assign_str uses 2021-06-30 09:19:14 -04:00
mei_dev.h mei: constify passed buffers and structures 2021-07-29 17:08:04 +02:00
pci-me.c mei: me: add Alder Lake N device id. 2022-03-18 13:48:16 +01:00
pci-txe.c mei: Remove usage of the deprecated "pci-dma-compat.h" API 2021-09-21 17:33:41 +02:00