aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-08-09 11:33:52 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-12 11:22:43 -0400
commite1d45ae10aea8e8a403e5d96bf5902ee670007ff (patch)
tree233b04be392f94701ce5f3593efa15da51e0a58f /drivers/media/dvb
parent3a7503b55ef19494a8eb1a1ccaecf09335c2489d (diff)
[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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/mantis/mantis_dvb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/mantis/mantis_dvb.c b/drivers/media/dvb/mantis/mantis_dvb.c
index e5180e45d310..5d15c6b74d9b 100644
--- a/drivers/media/dvb/mantis/mantis_dvb.c
+++ b/drivers/media/dvb/mantis/mantis_dvb.c
@@ -248,8 +248,10 @@ int __devinit mantis_dvb_init(struct mantis_pci *mantis)
248err5: 248err5:
249 tasklet_kill(&mantis->tasklet); 249 tasklet_kill(&mantis->tasklet);
250 dvb_net_release(&mantis->dvbnet); 250 dvb_net_release(&mantis->dvbnet);
251 dvb_unregister_frontend(mantis->fe); 251 if (mantis->fe) {
252 dvb_frontend_detach(mantis->fe); 252 dvb_unregister_frontend(mantis->fe);
253 dvb_frontend_detach(mantis->fe);
254 }
253err4: 255err4:
254 mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem); 256 mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem);
255 257