[media] nxt6000: i2c bus error should return -EIO
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 6 Jul 2011 15:41:21 +0000 (12:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:53:37 +0000 (17:53 -0300)
data from/to userspace. Don't mix it with I2C bus error (-EIO).

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/nxt6000.c

index a763ec756f7f84df840bcb38bfb3816ee016e174..6599b8fea9e9ad0d2c3bad2560565670b5e2486c 100644 (file)
@@ -50,7 +50,7 @@ static int nxt6000_writereg(struct nxt6000_state* state, u8 reg, u8 data)
        if ((ret = i2c_transfer(state->i2c, &msg, 1)) != 1)
                dprintk("nxt6000: nxt6000_write error (reg: 0x%02X, data: 0x%02X, ret: %d)\n", reg, data, ret);
 
-       return (ret != 1) ? -EFAULT : 0;
+       return (ret != 1) ? -EIO : 0;
 }
 
 static u8 nxt6000_readreg(struct nxt6000_state* state, u8 reg)