Skip to content

Commit e1d45ae

Browse files
Alan CoxMauro Carvalho Chehab
authored andcommitted
[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=16473 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 3a7503b commit e1d45ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/media/dvb/mantis/mantis_dvb.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ int __devinit mantis_dvb_init(struct mantis_pci *mantis)
248248
err5:
249249
tasklet_kill(&mantis->tasklet);
250250
dvb_net_release(&mantis->dvbnet);
251-
dvb_unregister_frontend(mantis->fe);
252-
dvb_frontend_detach(mantis->fe);
251+
if (mantis->fe) {
252+
dvb_unregister_frontend(mantis->fe);
253+
dvb_frontend_detach(mantis->fe);
254+
}
253255
err4:
254256
mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem);
255257

0 commit comments

Comments
 (0)