summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-03-21 13:04:42 -0400
committerTom Rini <trini@konsulko.com>2019-03-21 13:04:42 -0400
commit3d7891d3f3b67a0d150b38afccc0765bd19b0bd2 (patch)
treea2c95087d45ae1d50fd6044f0a4878b8d319eaec /drivers
parenta00d15757d7a513e410f15f2f910cb52333361a3 (diff)
parent9d59d6fff67da170873aaff66ff1a75514e54d29 (diff)
downloadu-boot-3d7891d3f3b67a0d150b38afccc0765bd19b0bd2.tar.gz
Merge branch 'master' of git://git.denx.de/u-boot-i2c
- i2c: i2c_cdns: Fix below warnings with checker tool
Diffstat (limited to 'drivers')
-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 */