Commit afca99a2 authored by Julian Scheel's avatar Julian Scheel Committed by Mauro Carvalho Chehab

[media] tm6000-dvb: Fix module unload

dvb_unregister_frontend has to be called before detach. Otherwise the
unregister call will segfault. This made tm6000-dvb module unload unusable.
Signed-off-by: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent afc2e8a0
......@@ -360,8 +360,8 @@ static int register_dvb(struct tm6000_core *dev)
dvb_dmx_release(&dvb->demux);
frontend_err:
if (dvb->frontend) {
dvb_frontend_detach(dvb->frontend);
dvb_unregister_frontend(dvb->frontend);
dvb_frontend_detach(dvb->frontend);
}
adapter_err:
dvb_unregister_adapter(&dvb->adapter);
......@@ -384,8 +384,8 @@ static void unregister_dvb(struct tm6000_core *dev)
/* mutex_lock(&tm6000_driver.open_close_mutex); */
if (dvb->frontend) {
dvb_frontend_detach(dvb->frontend);
dvb_unregister_frontend(dvb->frontend);
dvb_frontend_detach(dvb->frontend);
}
dvb_dmxdev_release(&dvb->dmxdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment