android_kernel_samsung_sm8650/drivers/media/pci/solo6x10
Yang Yingliang 9416861170 media: solo6x10: fix possible memory leak in solo_sysfs_init()
[ Upstream commit 7f5866dd96d95b74e439f6ee17b8abd8195179fb ]

If device_register() returns error in solo_sysfs_init(), the
name allocated by dev_set_name() need be freed. As comment of
device_register() says, it should use put_device() to give up
the reference in the error path. So fix this by calling
put_device(), then the name can be freed in kobject_cleanup().

Fixes: dcae5dacbc ("[media] solo6x10: sync to latest code from Bluecherry's git repo")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:13 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
solo6x10-core.c media: solo6x10: fix possible memory leak in solo_sysfs_init() 2022-12-31 13:32:13 +01:00
solo6x10-disp.c media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-eeprom.c media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-enc.c media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-g723.c media: solo6x10: switch from 'pci_' to 'dma_' API 2020-12-03 08:55:05 +01:00
solo6x10-gpio.c media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-i2c.c media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
solo6x10-jpeg.h media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-offsets.h media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-p2m.c media: solo6x10: switch from 'pci_' to 'dma_' API 2020-12-03 08:55:05 +01:00
solo6x10-regs.h media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-tw28.c media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-tw28.h media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00
solo6x10-v4l2-enc.c media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
solo6x10-v4l2.c media: v4l: ioctl: Set bus_info in v4l_querycap() 2022-04-24 08:07:08 +01:00
solo6x10.h media: solo6x10: replace http references with https 2020-07-19 07:52:59 +02:00