summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-30 12:45:00 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-30 12:45:00 -0300
commitac958e9cce48978cd215e7146fefacee8b3ae490 (patch)
tree262135222640a1d6f1cc4d0609a100cdf0dae536 /linux/drivers/media/video/tuner-core.c
parentbbc32df41597ebd0b15fd818a5ac6b37e38a3dfe (diff)
downloadmediapointer-dvb-s2-ac958e9cce48978cd215e7146fefacee8b3ae490.tar.gz
mediapointer-dvb-s2-ac958e9cce48978cd215e7146fefacee8b3ae490.tar.bz2
tea5767: Fix error logic
From: Mauro Carvalho Chehab <mchehab@infradead.org> As pointed by Andrew Morton, the error testing were wrong. After reviewing tea5767, it were returning a positive value for errors. So, the double errors were cancelling each other. This patch fix it properly. It also considers any positive value as ok, on tuner-core. CC: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 818fa7008..f4cac029f 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1208,7 +1208,7 @@ static int tuner_probe(struct i2c_client *client)
/* If chip is not tda8290, don't register.
since it can be tda9887*/
if (tuner_symbol_probe(tda829x_probe, t->i2c->adapter,
- t->i2c->addr) == 0) {
+ t->i2c->addr) >= 0) {
tuner_dbg("tda829x detected\n");
} else {
/* Default is being tda9887 */
@@ -1222,7 +1222,7 @@ static int tuner_probe(struct i2c_client *client)
case 0x60:
if (tuner_symbol_probe(tea5767_autodetection,
t->i2c->adapter, t->i2c->addr)
- != EINVAL) {
+ >= 0) {
t->type = TUNER_TEA5767;
t->mode_mask = T_RADIO;
t->mode = T_STANDBY;