Skip to content

Commit

Permalink
[media] dvb: return the error from i2c_transfer if negative
Browse files Browse the repository at this point in the history
Just returns whatever error that was returned by the i2c core,
in the case of errors, only returning -EREMOTEIO if the transfer size
is not what it was expected.

Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Hans Wennborg authored and Mauro Carvalho Chehab committed Sep 22, 2014
1 parent a375218 commit 612f676
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/dvb-frontends/mb86a16.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ static int mb86a16_read(struct mb86a16_state *state, u8 reg, u8 *val)
dprintk(verbose, MB86A16_ERROR, 1, "read error(reg=0x%02x, ret=%i)",
reg, ret);

if (ret < 0)
return ret;
return -EREMOTEIO;
}
*val = b1[0];
Expand Down

0 comments on commit 612f676

Please sign in to comment.