From patchwork Wed Jul 20 06:48:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanlong Gao X-Patchwork-Id: 990322 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6K6nnRv004958 for ; Wed, 20 Jul 2011 06:49:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751103Ab1GTGtc (ORCPT ); Wed, 20 Jul 2011 02:49:32 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:49398 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751037Ab1GTGt2 (ORCPT ); Wed, 20 Jul 2011 02:49:28 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id EBA45170134; Wed, 20 Jul 2011 14:49:21 +0800 (CST) Received: from mailserver.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p6K6nLAM007304; Wed, 20 Jul 2011 14:49:21 +0800 Received: from gaowanlong.fnst.cn.fujitsu.com ([10.167.225.68]) by mailserver.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011072014483247-877392 ; Wed, 20 Jul 2011 14:48:32 +0800 From: Wanlong Gao To: dtor@mail.ru Cc: linux-input@vger.kernel.org, chudson@kionix.com, Wanlong Gao Subject: [PATCH] input:kxtj9:check the return value of kxtj9_enable() Date: Wed, 20 Jul 2011 14:48:22 +0800 Message-Id: <1311144502-16932-1-git-send-email-gaowanlong@cn.fujitsu.com> X-Mailer: git-send-email 1.7.6 X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-07-20 14:48:32, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-07-20 14:48:32, Serialize complete at 2011-07-20 14:48:32 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 20 Jul 2011 06:49:49 +0000 (UTC) If don't check the return value of kxtj9_enable(), the kxtj9_resume() will always return 0 instead. Signed-off-by: Wanlong Gao --- drivers/input/misc/kxtj9.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index a416f7f..b835c29 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c @@ -627,7 +627,7 @@ static int kxtj9_resume(struct device *dev) mutex_lock(&input_dev->mutex); if (input_dev->users) - kxtj9_enable(tj9); + retval = kxtj9_enable(tj9); mutex_unlock(&input_dev->mutex); return retval;