summaryrefslogtreecommitdiff
path: root/drivers/media/test-drivers/vidtv/vidtv_bridge.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-11 14:14:36 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-12 10:43:54 +0300
commit63101b75689331c5392c9330291f57b9fd2ef94c (patch)
treef4d8ca04a8bce08e338a35301f4171147d566237 /drivers/media/test-drivers/vidtv/vidtv_bridge.c
parent1f9a704601f02710f1456858f77e338b05c82f17 (diff)
downloadlinux-63101b75689331c5392c9330291f57b9fd2ef94c.tar.xz
media: vidtv: fix driver unbind/remove
The current remove logic is broken and causes an OOPS. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers/vidtv/vidtv_bridge.c')
-rw-r--r--drivers/media/test-drivers/vidtv/vidtv_bridge.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
index 16ee23e2223d..82e375048b99 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
@@ -472,30 +472,16 @@ static int vidtv_bridge_remove(struct platform_device *pdev)
mutex_destroy(&dvb->feed_lock);
- for (i = 0; i < NUM_FE; ++i)
- dvb->demux.dmx.remove_frontend(&dvb->demux.dmx,
- &dvb->dmx_fe[i]);
-
- dvb_dmxdev_release(&dvb->dmx_dev);
- dvb_dmx_release(&dvb->demux);
-
for (i = 0; i < NUM_FE; ++i) {
dvb_unregister_frontend(dvb->fe[i]);
- dvb_frontend_detach(dvb->fe[i]);
- }
-
- dvb_unregister_adapter(&dvb->adapter);
-
- for (i = 0; i < NUM_FE; i++)
dvb_module_release(dvb->i2c_client_tuner[i]);
-
- for (i = 0; i < NUM_FE ; i++)
dvb_module_release(dvb->i2c_client_demod[i]);
+ }
+ dvb_dmxdev_release(&dvb->dmx_dev);
+ dvb_dmx_release(&dvb->demux);
dvb_unregister_adapter(&dvb->adapter);
- i2c_del_adapter(&dvb->i2c_adapter);
-
return 0;
}