From patchwork Tue Dec 17 03:27:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3358621 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C4B8D9F314 for ; Tue, 17 Dec 2013 03:27:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFB46201F9 for ; Tue, 17 Dec 2013 03:27:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A03AA200F2 for ; Tue, 17 Dec 2013 03:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573Ab3LQD1R (ORCPT ); Mon, 16 Dec 2013 22:27:17 -0500 Received: from mail-bk0-f45.google.com ([209.85.214.45]:52034 "EHLO mail-bk0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751551Ab3LQD1R (ORCPT ); Mon, 16 Dec 2013 22:27:17 -0500 Received: by mail-bk0-f45.google.com with SMTP id mx13so2631979bkb.32 for ; Mon, 16 Dec 2013 19:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=i4Lih+qVWxw7iL3a7g2152Ecwya0rZ7BUI7tVAYM8PQ=; b=glC8M4h0Gd93zhaUAfoTuw22jGF9yy9HyjhMaBLAGuqMWDpnoJIKoKESV6hufg1x7+ DH414l+h6Lqi3OHCddxEEOkqeEncjYmrBuwhICMDFeYPaP94742tNnt1VTWo6L+dSVu1 SQ9tbw1Sla8bsZ+3Mjx0ZUgl3M6Hn1CGX8cih23q/AjnpPLzh+DE7f5i2lRzlFW0+mjX 8ETA13jpwLUZncbsmmiTIst1AauDaOx2cb0Mky0nUnzz3AFc15QBS8RsNjQFtpn4K9b2 MjXXSq/gjT6/Uiugzvf4qsIWc8jpY8LHyA0Jz8dznkdJdPq20r/oY4+INL7Kbv6kWJ8D WEgA== MIME-Version: 1.0 X-Received: by 10.205.8.199 with SMTP id ot7mr138615bkb.82.1387250836411; Mon, 16 Dec 2013 19:27:16 -0800 (PST) Received: by 10.204.74.130 with HTTP; Mon, 16 Dec 2013 19:27:16 -0800 (PST) Date: Tue, 17 Dec 2013 11:27:16 +0800 Message-ID: Subject: [PATCH -next] Input: zforce - fix error return code in zforce_start() From: Wei Yongjun To: dmitry.torokhov@gmail.com, rydberg@euromail.se, heiko@sntech.de Cc: yongjun_wei@trendmicro.com.cn, linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun 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 Acked-by: Heiko Stuebner --- drivers/input/touchscreen/zforce_ts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 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 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; }