* [PATCH -next] Input: zforce - fix error return code in zforce_start()
@ 2013-12-17 3:27 Wei Yongjun
2013-12-17 15:06 ` Heiko Stübner
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-12-17 3:27 UTC (permalink / raw)
To: dmitry.torokhov, rydberg, heiko; +Cc: yongjun_wei, linux-input
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>
---
drivers/input/touchscreen/zforce_ts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index aa127ba..2175f34 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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] Input: zforce - fix error return code in zforce_start()
2013-12-17 3:27 [PATCH -next] Input: zforce - fix error return code in zforce_start() Wei Yongjun
@ 2013-12-17 15:06 ` Heiko Stübner
2013-12-18 16:50 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stübner @ 2013-12-17 15:06 UTC (permalink / raw)
To: Wei Yongjun; +Cc: dmitry.torokhov, rydberg, yongjun_wei, linux-input
Am Dienstag, 17. Dezember 2013, 04:27:16 schrieb Wei Yongjun:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
Thanks for the catch.
Acked-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] Input: zforce - fix error return code in zforce_start()
2013-12-17 15:06 ` Heiko Stübner
@ 2013-12-18 16:50 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2013-12-18 16:50 UTC (permalink / raw)
To: Heiko Stübner; +Cc: Wei Yongjun, rydberg, yongjun_wei, linux-input
On Tue, Dec 17, 2013 at 04:06:49PM +0100, Heiko Stübner wrote:
> Am Dienstag, 17. Dezember 2013, 04:27:16 schrieb Wei Yongjun:
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >
> > 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>
>
> Thanks for the catch.
>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
Applied, thank you.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-18 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 3:27 [PATCH -next] Input: zforce - fix error return code in zforce_start() Wei Yongjun
2013-12-17 15:06 ` Heiko Stübner
2013-12-18 16:50 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).