Platform: OLPC: Fix olpc_xo175_ec_cmd() return value

Reset the ret variable to make sure it olpc_xo175_ec_cmd() ends up
returning zero on success.

Fixes: 0c3d931b3a ("Platform: OLPC: Add XO-1.75 EC driver")
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Lubomir Rintel 2019-05-29 10:34:03 +02:00 committed by Andy Shevchenko
parent b8a84365bb
commit fd43f16cca

View File

@ -507,6 +507,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp,
nr_bytes = resp_len;
} else {
nr_bytes = (size_t)ret;
ret = 0;
}
resp_len = min(resp_len, nr_bytes);