diff mbox

[2/8,media] tda8290: Fix a bug if no tuner is detected

Message ID 20110115160416.2f48be14@pedra (mailing list archive)
State Accepted
Headers show

Commit Message

Mauro Carvalho Chehab Jan. 15, 2011, 6:04 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c
index 5f889c1..11ea4e0 100644
--- a/drivers/media/common/tuners/tda8290.c
+++ b/drivers/media/common/tuners/tda8290.c
@@ -755,8 +755,11 @@  struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,
 	}
 
 	if ((!(cfg) || (TDA829X_PROBE_TUNER == cfg->probe_tuner)) &&
-	    (tda829x_find_tuner(fe) < 0))
+	    (tda829x_find_tuner(fe) < 0)) {
+		memset(&fe->ops.analog_ops, 0, sizeof(struct analog_demod_ops));
+
 		goto fail;
+	}
 
 	switch (priv->ver) {
 	case TDA8290: