linux-stable/drivers/bus
Ivan Bornyakov 643170dac6 bus: imx-weim: fix branch condition evaluates to a garbage value
[ Upstream commit 1adab2922c ]

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: Sasha Levin <sashal@kernel.org>
2023-04-05 11:15:38 +02:00
..
fsl-mc bus: fsl-mc: fix error return code in fsl_mc_object_allocate() 2020-12-30 11:26:02 +01:00
arm-cci.c
brcmstb_gisb.c
da8xx-mstpri.c
hisi_lpc.c bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() 2022-08-25 11:15:02 +02:00
imx-weim.c bus: imx-weim: fix branch condition evaluates to a garbage value 2023-04-05 11:15:38 +02:00
Kconfig bus: add bus driver for accessing Allwinner A64 DE2 2018-06-28 10:20:19 +02:00
Makefile bus: add bus driver for accessing Allwinner A64 DE2 2018-06-28 10:20:19 +02:00
mips_cdmm.c mips: cdmm: fix use-after-free in mips_cdmm_bus_discover 2020-12-30 11:25:57 +01:00
mvebu-mbus.c
omap-ocp2scp.c
omap_l3_noc.c bus: omap_l3_noc: mark l3 irqs as IRQF_NO_THREAD 2021-03-30 14:37:00 +02:00
omap_l3_noc.h
omap_l3_smx.c
omap_l3_smx.h
qcom-ebi2.c bus: qcom: Put child node before return 2021-05-22 10:59:29 +02:00
simple-pm-bus.c
sun50i-de2.c bus: add bus driver for accessing Allwinner A64 DE2 2018-06-28 10:20:19 +02:00
sunxi-rsb.c bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() 2023-02-22 12:47:11 +01:00
tegra-aconnect.c
tegra-gmi.c
ti-sysc.c bus: ti-sysc: Fix warnings for unbind for serial 2022-06-14 16:59:33 +02:00
ts-nbus.c
uniphier-system-bus.c
vexpress-config.c