diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-30 22:45:00 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-14 09:53:58 +0400 |
commit | b538d28c2e326ed226096408dce4d9469d7ffa39 (patch) | |
tree | 10ec81016de1f846479d6450bc5c9f10aa4bffcc /drivers/media/video/tuner-core.c | |
parent | 09fee5f8211fc0a586187c4a0db7f5f42a4e333f (diff) | |
download | linux-b538d28c2e326ed226096408dce4d9469d7ffa39.tar.xz |
V4L/DVB (7804): tea5767: Fix error logic
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.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r-- | drivers/media/video/tuner-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index b5dacde023ee..4ca686fad557 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -1165,7 +1165,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 */ @@ -1179,7 +1179,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; |