diff mbox

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

Message ID 20110113161334.1a089a9c@pedra (mailing list archive)
State RFC
Headers show

Commit Message

Mauro Carvalho Chehab Jan. 13, 2011, 6:13 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: