linux-stable/drivers/bus
Christophe JAILLET b5b207f612 bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
[ Upstream commit fff8c10368 ]

This code is really spurious.
It always returns an ERR_PTR, even when err is known to be 0 and calls
put_device() after a successful device_register() call.

It is likely that the return statement in the normal path is missing.
Add 'return rdev;' to fix it.

Fixes: d787dcdb9c ("bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/ef2b9576350bba4c8e05e669e9535e9e2a415763.1650551719.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-12 12:17:07 +02:00
..
arm-cci.c bus: arm-cci: remove unnecessary unreachable() 2018-12-01 09:42:49 +01:00
arm-ccn.c
brcmstb_gisb.c
da8xx-mstpri.c
imx-weim.c
Kconfig
Makefile
mips_cdmm.c mips: cdmm: fix use-after-free in mips_cdmm_bus_discover 2020-12-29 13:46:56 +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:40:10 +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:57:28 +02:00
simple-pm-bus.c
sunxi-rsb.c bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create() 2022-05-12 12:17:07 +02:00
tegra-aconnect.c
tegra-gmi.c
uniphier-system-bus.c
vexpress-config.c