summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2019-03-31 19:54:10 +0200
committerStefano Babic <sbabic@denx.de>2019-03-31 19:54:10 +0200
commit66c433ed4342e5761ee9b048c85fe47d31130b2e (patch)
tree60977b825765ebe490b01aae2154002eeea6a76b /drivers/i2c
parent4b387deb78dcbe491c1f73fdd758f4ca3307bbbe (diff)
parentc3aef9339ce0592b06c8d44cf2eaf9e6f3713e4f (diff)
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-cdns.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 1af94d1761..2c0301ad08 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -308,14 +308,10 @@ static int cdns_i2c_read_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data,
{
u8 *cur_data = data;
struct cdns_i2c_regs *regs = i2c_bus->regs;
- int curr_recv_count;
+ u32 curr_recv_count;
int updatetx, hold_quirk;
u32 ret;
- /* Check the hardware can handle the requested bytes */
- if ((recv_count < 0))
- return -EINVAL;
-
curr_recv_count = recv_count;
/* Check for the message size against the FIFO depth */