Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 612f676b authored by Hans Wennborg's avatar Hans Wennborg Committed by Mauro Carvalho Chehab
Browse files

[media] dvb: return the error from i2c_transfer if negative



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: default avatarHans Wennborg <hans@hanshq.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent a3752184
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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];