linux/drivers/i3c
Dinghao Liu 174ae0a3b8 i3c: Fix potential refcount leak in i3c_master_register_new_i3c_devs
[ Upstream commit cab63f6488 ]

put_device() needs to be called on failure of device_register()
to give up the reference initialized in it to avoid refcount leak.

Fixes: 3a379bbcea ("i3c: Add core I3C infrastructure")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20230921082410.25548-1-dinghao.liu@zju.edu.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-11-20 11:52:13 +01:00
..
master i3c: master: svc: fix probe failure when no i3c device exist 2023-09-13 09:43:01 +02:00
device.c i3c: Handle drivers without probe or remove callback 2021-02-02 00:16:57 +01:00
internals.h i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
Kconfig i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
Makefile i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
master.c i3c: Fix potential refcount leak in i3c_master_register_new_i3c_devs 2023-11-20 11:52:13 +01:00