linux-stable/drivers/misc
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
..
altera-stapl
bcm-vk
c2port
cardreader misc: rtsx: rts522a rts5228 rts5261 support Runtime PM 2022-02-25 12:11:16 +01:00
cb710
cxl
echo
eeprom
genwqe
habanalabs habanalabs: remove deprecated firmware states 2022-02-28 14:34:50 +02:00
ibmasm
lis3lv02d
lkdtm
mei mei: avoid iterator usage outside of list_for_each_entry 2022-03-18 13:48:30 +01:00
ocxl
pvpanic
sgi-gru
sgi-xp
ti-st
uacce
vmw_vmci VMCI: Release notification_bitmap in error path 2022-03-18 13:47:48 +01:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c
enclosure.c
fastrpc.c
gehc-achc.c
hi6421v600-irq.c
hisi_hikey_usb.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c
lattice-ecp3-config.c
Makefile
open-dice.c
pch_phub.c
pci_endpoint_test.c
phantom.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vmw_balloon.c
xilinx_sdfec.c