Commit fd43f16c authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Andy Shevchenko

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: 0c3d931b ("Platform: OLPC: Add XO-1.75 EC driver")
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent b8a84365
...@@ -507,6 +507,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp, ...@@ -507,6 +507,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp,
nr_bytes = resp_len; nr_bytes = resp_len;
} else { } else {
nr_bytes = (size_t)ret; nr_bytes = (size_t)ret;
ret = 0;
} }
resp_len = min(resp_len, nr_bytes); resp_len = min(resp_len, nr_bytes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment