summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-12-17 17:58:18 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-18 17:47:39 +0100
commit3c4396b434613f653bf95f741a6000e671d1e011 (patch)
treeb719ce87281e6e002b137f018701e63e93a9cf00 /drivers/input
parentInput: elantech - improve clickpad detection (diff)
downloadlinux-3c4396b434613f653bf95f741a6000e671d1e011.tar.xz
linux-3c4396b434613f653bf95f741a6000e671d1e011.zip
Input: zforce - fix error return code in zforce_start()
The error code was not set if unable to set config, so the error condition wasn't reflected in the return value. Fix to return a negative error code from the error handling case instead of 0. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/zforce_ts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 75762d6ff3ba..4ffe4cc3b234 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -279,7 +279,8 @@ static int zforce_start(struct zforce_ts *ts)
goto error;
}
- if (zforce_setconfig(ts, SETCONFIG_DUALTOUCH)) {
+ ret = zforce_setconfig(ts, SETCONFIG_DUALTOUCH);
+ if (ret) {
dev_err(&client->dev, "Unable to set config\n");
goto error;
}