From patchwork Thu Apr 3 01:37:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3931181 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AC9DCBF540 for ; Thu, 3 Apr 2014 01:39:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E699C202A1 for ; Thu, 3 Apr 2014 01:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 091332026D for ; Thu, 3 Apr 2014 01:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161145AbaDCBi6 (ORCPT ); Wed, 2 Apr 2014 21:38:58 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49610 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030465AbaDCBi4 (ORCPT ); Wed, 2 Apr 2014 21:38:56 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s331bLjS031467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Apr 2014 01:37:22 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s331bIcY026161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Apr 2014 01:37:19 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s331bI66000971; Thu, 3 Apr 2014 01:37:18 GMT Received: from mwanda (/197.157.0.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 02 Apr 2014 18:37:17 -0700 Date: Thu, 3 Apr 2014 04:37:12 +0300 From: Dan Carpenter To: Dmitry Torokhov , Lothar =?iso-8859-1?Q?Wa=DFmann?= Cc: Henrik Rydberg , Grant Likely , Rob Herring , Fugang Duan , Jingoo Han , linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch v2] Input: edt-ft5x06 - add a missing condition Message-ID: <20140403013712.GA28270@mwanda> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <002101cf4eda$184e85b0$48eb9110$%han@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet21.oracle.com [141.146.126.237] 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The if condition was accidentally deleted here so we return every time instead of returning on error. Fixes: fd335ab04b3f ('Input: edt-ft5x06 - add support for M09 firmware version') Signed-off-by: Dan Carpenter Reviewed-by: Jingoo Han Acked-By: Lothar Waßmann --- v2: removed a stray tab character -- 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/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 75b666b..9d0b324 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -291,9 +291,10 @@ static int edt_ft5x06_register_read(struct edt_ft5x06_ts_data *tsdata, wrbuf[1] = tsdata->factory_mode ? addr & 0x7f : addr & 0x3f; wrbuf[1] |= tsdata->factory_mode ? 0x80 : 0x40; - error = edt_ft5x06_ts_readwrite(tsdata->client, - 2, wrbuf, 2, rdbuf); - return error; + error = edt_ft5x06_ts_readwrite(tsdata->client, 2, wrbuf, 2, + rdbuf); + if (error) + return error; if ((wrbuf[0] ^ wrbuf[1] ^ rdbuf[0]) != rdbuf[1]) { dev_err(&tsdata->client->dev,