[media] Mantis: use dvb_attach to avoid double dereferencing on module removal
[pandora-kernel.git] / drivers / media / dvb / mantis / mantis_vp1041.c
index d1aa2bc..38a436c 100644 (file)
@@ -316,14 +316,14 @@ static int vp1041_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *
        if (err == 0) {
                mantis_frontend_soft_reset(mantis);
                msleep(250);
-               mantis->fe = stb0899_attach(&vp1041_stb0899_config, adapter);
+               mantis->fe = dvb_attach(stb0899_attach, &vp1041_stb0899_config, adapter);
                if (mantis->fe) {
                        dprintk(MANTIS_ERROR, 1,
                                "found STB0899 DVB-S/DVB-S2 frontend @0x%02x",
                                vp1041_stb0899_config.demod_address);
 
-                       if (stb6100_attach(mantis->fe, &vp1041_stb6100_config, adapter)) {
-                               if (!lnbp21_attach(mantis->fe, adapter, 0, 0))
+                       if (dvb_attach(stb6100_attach, mantis->fe, &vp1041_stb6100_config, adapter)) {
+                               if (!dvb_attach(lnbp21_attach, mantis->fe, adapter, 0, 0))
                                        dprintk(MANTIS_ERROR, 1, "No LNBP21 found!");
                        }
                } else {