Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Dmitry Torokhov
3c4396b4 c15bdfd5

+2 -1
+2 -1
drivers/input/touchscreen/zforce_ts.c
··· 279 279 goto error; 280 280 } 281 281 282 - if (zforce_setconfig(ts, SETCONFIG_DUALTOUCH)) { 282 + ret = zforce_setconfig(ts, SETCONFIG_DUALTOUCH); 283 + if (ret) { 283 284 dev_err(&client->dev, "Unable to set config\n"); 284 285 goto error; 285 286 }