V4L/DVB (7902): fix handling of tea5761_autodetection return value
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Sun, 11 May 2008 22:51:07 +0000 (19:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 5 Jun 2008 09:35:40 +0000 (06:35 -0300)
tea5761_autodetection returns -EINVAL on error

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/common/tuners/tea5761.c

index b93cdef..b23dade 100644 (file)
@@ -295,7 +295,7 @@ struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe,
 {
        struct tea5761_priv *priv = NULL;
 
-       if (tea5761_autodetection(i2c_adap, i2c_addr) == EINVAL)
+       if (tea5761_autodetection(i2c_adap, i2c_addr) != 0)
                return NULL;
 
        priv = kzalloc(sizeof(struct tea5761_priv), GFP_KERNEL);