summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-05-29 10:34:03 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-06-12 11:53:10 +0300
commitfd43f16cca951b5eea6703f5f98381cf4883f86c (patch)
treec1b4968dc9eefcac9724cb2b2f99dd7567692f83
parentb8a84365bbff0f860c5dc5795405430d92d68966 (diff)
downloadlinux-fd43f16cca951b5eea6703f5f98381cf4883f86c.tar.bz2
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: 0c3d931b3ab9 ("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>
-rw-r--r--drivers/platform/olpc/olpc-xo175-ec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c
index 344d14f3da54..48d6f0d87583 100644
--- a/drivers/platform/olpc/olpc-xo175-ec.c
+++ b/drivers/platform/olpc/olpc-xo175-ec.c
@@ -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);