WSL2-Linux-Kernel/drivers/media/test-drivers
Chen Zhongjin 9c9ff35d68 media: vimc: Fix wrong function called when vimc_init() fails
[ Upstream commit f74d3f326d ]

In vimc_init(), when platform_driver_register(&vimc_pdrv) fails,
platform_driver_unregister(&vimc_pdrv) is wrongly called rather than
platform_device_unregister(&vimc_pdev), which causes kernel warning:

 Unexpected driver unregister!
 WARNING: CPU: 1 PID: 14517 at drivers/base/driver.c:270 driver_unregister+0x8f/0xb0
 RIP: 0010:driver_unregister+0x8f/0xb0
 Call Trace:
  <TASK>
  vimc_init+0x7d/0x1000 [vimc]
  do_one_initcall+0xd0/0x4e0
  do_init_module+0x1cf/0x6b0
  load_module+0x65c2/0x7820

Fixes: 4a29b70907 ("[media] vimc: Subdevices as modules")
Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:14:12 +01:00
..
vicodec media: vicodec: Do not zero reserved fields 2021-01-27 13:21:44 +01:00
vidtv media: vidtv: Fix use-after-free in vidtv_bridge_dvb_init() 2022-12-31 13:14:10 +01:00
vimc media: vimc: Fix wrong function called when vimc_init() fails 2022-12-31 13:14:12 +01:00
vivid media: vivid: fix compose size exceed boundary 2022-12-31 13:14:08 +01:00
Kconfig media: media/test-drivers/Kconfig: fix broken Kconfig 2020-09-12 10:21:01 +02:00
Makefile media: vidtv: implement a tuner driver 2020-09-12 09:42:16 +02:00
vim2m.c media: media/test_drivers: Drop unnecessary NULL check after container_of 2021-06-02 13:31:13 +02:00