diff options
author | Alan Cox <alan@linux.intel.com> | 2012-08-09 12:33:52 -0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-05-30 14:35:15 +0100 |
commit | 0a686e3291bf91d6fa52046505002b2c6cb556a2 (patch) | |
tree | 29df79e6121db172b1c302f684448f23066facbe /drivers/media | |
parent | 7abe9d39f7a6c39cb282dac10c9345e242b4c6fb (diff) |
[media] mantis: fix silly crash case
commit e1d45ae10aea8e8a403e5d96bf5902ee670007ff upstream.
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/mantis/mantis_dvb.c | 6 |
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) err5: tasklet_kill(&mantis->tasklet); dvb_net_release(&mantis->dvbnet); - dvb_unregister_frontend(mantis->fe); - dvb_frontend_detach(mantis->fe); + if (mantis->fe) { + dvb_unregister_frontend(mantis->fe); + dvb_frontend_detach(mantis->fe); + } err4: mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem); |