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
..
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arm-cci.c bus: arm-cci: remove unnecessary unreachable() 2018-12-01 09:42:49 +01:00
arm-ccn.c drivers/perf: arm-ccn: don't log to dmesg in event_init 2018-08-03 07:50:31 +02:00
brcmstb_gisb.c bus: brcmstb_gisb: update to support new revision 2017-05-13 20:18:57 -07:00
da8xx-mstpri.c bus: da850-mstpri: fix my e-mail address 2017-01-02 15:52:32 +05:30
imx-weim.c bus: Convert to using %pOF instead of full_name 2017-08-16 17:21:40 +02:00
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 bus: mbus: fix window size calculation for 4GB windows 2017-10-12 15:01:30 +02:00
omap-ocp2scp.c bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe 2017-07-12 02:25:41 -07:00
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 bus: uniphier-system-bus: set up registers when resuming 2017-08-04 12:57:18 +02:00
vexpress-config.c bus: vexpress-config: fix device reference leak 2016-11-30 23:29:37 +01:00