Commit e1d45ae1 authored by Alan Cox's avatar Alan Cox Committed by Mauro Carvalho Chehab

[media] mantis: fix silly crash case

If we set mantis->fe to NULL on an error its not a good idea to then try
passing NULL to the unregister paths and oopsing really.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=16473Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3a7503b5
...@@ -248,8 +248,10 @@ int __devinit mantis_dvb_init(struct mantis_pci *mantis) ...@@ -248,8 +248,10 @@ int __devinit mantis_dvb_init(struct mantis_pci *mantis)
err5: err5:
tasklet_kill(&mantis->tasklet); tasklet_kill(&mantis->tasklet);
dvb_net_release(&mantis->dvbnet); dvb_net_release(&mantis->dvbnet);
dvb_unregister_frontend(mantis->fe); if (mantis->fe) {
dvb_frontend_detach(mantis->fe); dvb_unregister_frontend(mantis->fe);
dvb_frontend_detach(mantis->fe);
}
err4: err4:
mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem); mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem);
......
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