Skip to content

Commit

Permalink
media: mantis: fix silly crash case
Browse files Browse the repository at this point in the history
commit e1d45ae 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>
Cc: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed May 24, 2013
1 parent a91ffa3 commit 136eafa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/media/dvb/mantis/mantis_dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 136eafa

Please sign in to comment.