]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Input: zforce - fix error return code in zforce_start()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 17 Dec 2013 16:58:18 +0000 (08:58 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 18 Dec 2013 16:47:39 +0000 (08:47 -0800)
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>
drivers/input/touchscreen/zforce_ts.c

index 75762d6ff3ba70934190bb2fe70ef6d6135d49c5..4ffe4cc3b23424b11358db3d35193c5ad8786872 100644 (file)
@@ -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;
        }