acrn-kernel/drivers/bus
Ivan Bornyakov d22bc65a98 bus: imx-weim: fix branch condition evaluates to a garbage value
commit 1adab2922c upstream.

If bus type is other than imx50_weim_devtype and have no child devices,
variable 'ret' in function weim_parse_dt() will not be initialized, but
will be used as branch condition and return value. Fix this by
initializing 'ret' with 0.

This was discovered with help of clang-analyzer, but the situation is
quite possible in real life.

Fixes: 52c47b6341 ("bus: imx-weim: improve error handling upon child probe-failure")
Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Cc: stable@vger.kernel.org
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-30 12:49:29 +02:00
..
fsl-mc
mhi bus: mhi: ep: Change state_lock to mutex 2023-03-17 08:50:19 +01:00
Kconfig
Makefile
arm-cci.c
arm-integrator-lm.c
brcmstb_gisb.c
bt1-apb.c
bt1-axi.c
da8xx-mstpri.c
hisi_lpc.c
imx-weim.c bus: imx-weim: fix branch condition evaluates to a garbage value 2023-03-30 12:49:29 +02:00
intel-ixp4xx-eb.c
mips_cdmm.c
moxtet.c
mvebu-mbus.c
omap-ocp2scp.c
omap_l3_noc.c
omap_l3_noc.h
omap_l3_smx.c
omap_l3_smx.h
qcom-ebi2.c
qcom-ssc-block-bus.c
simple-pm-bus.c
sun50i-de2.c
sunxi-rsb.c
tegra-aconnect.c
tegra-gmi.c
ti-pwmss.c
ti-sysc.c
ts-nbus.c
uniphier-system-bus.c
vexpress-config.c