From: Manu Abraham <abraham.manu@gmail.com>
Date: Wed, 9 Dec 2009 22:59:26 +0000 (-0300)
Subject: V4L/DVB (13805): Fix: Unregister the frontend before detaching
X-Git-Tag: firefly_0821_release~9833^2~3333^2~11
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c5e598a6f89ca7335db9f327e24e3abd13d137cf;p=firefly-linux-kernel-4.4.55.git

V4L/DVB (13805): Fix: Unregister the frontend before detaching

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/dvb/mantis/mantis_dvb.c b/drivers/media/dvb/mantis/mantis_dvb.c
index 1e08e3107639..54bf4ea9efd7 100644
--- a/drivers/media/dvb/mantis/mantis_dvb.c
+++ b/drivers/media/dvb/mantis/mantis_dvb.c
@@ -281,8 +281,8 @@ int __devexit mantis_dvb_exit(struct mantis_pci *mantis)
 		err = mantis_frontend_shutdown(mantis);
 		if (err != 0)
 			dprintk(MANTIS_ERROR, 1, "Frontend exit while POWER ON! <%d>", err);
-		dvb_frontend_detach(mantis->fe);
 		dvb_unregister_frontend(mantis->fe);
+		dvb_frontend_detach(mantis->fe);
 	}
 
 	tasklet_kill(&mantis->tasklet);