linux-stable/drivers/mcb
Yang Yingliang 891f606ae0 mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
[ Upstream commit 728ac33892 ]

If mcb_device_register() returns error in chameleon_parse_gdd(), the refcount
of bus and device name are leaked. Fix this by calling put_device() to give up
the reference, so they can be released in mcb_release_dev() and kobject_cleanup().

Fixes: 3764e82e51 ("drivers: Introduce MEN Chameleon Bus")
Reviewed-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Link: https://lore.kernel.org/r/ebfb06e39b19272f0197fa9136b5e4b6f34ad732.1669624063.git.johannes.thumshirn@wdc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:26 +01:00
..
Kconfig
Makefile
mcb-core.c drivers: mcb: fix resource leak in mcb_probe() 2023-01-07 12:07:26 +01:00
mcb-internal.h
mcb-lpc.c MCB: add support for SC31 to mcb-lpc 2017-09-09 17:39:41 +02:00
mcb-parse.c mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2023-01-07 12:07:26 +01:00
mcb-pci.c mcb: Enable PCI bus mastering by default 2016-09-27 12:33:47 +02:00