From patchwork Fri Sep 11 03:02:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WEN Pingbo X-Patchwork-Id: 7157241 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95826BEEC1 for ; Fri, 11 Sep 2015 03:03:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBC5320872 for ; Fri, 11 Sep 2015 03:03:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D50A320873 for ; Fri, 11 Sep 2015 03:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751370AbbIKDD4 (ORCPT ); Thu, 10 Sep 2015 23:03:56 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34906 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbbIKDDz (ORCPT ); Thu, 10 Sep 2015 23:03:55 -0400 Received: by pacfv12 with SMTP id fv12so62134551pac.2 for ; Thu, 10 Sep 2015 20:03:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8vMXenmxNyhewCwOvHYg2y/8HG5AmwdzNnbd+Pks1Vw=; b=YB2eAVFuWkoeSKWgGeVad4UkzU0r498gJzSfj5f+P3SlD5leVcfPwQJZ/Rg20NAZQN s6WCHq8ZcpJkLGjFyNChEa2CiYRAZnqiIgDaF+yaQftSlSkI285kndJC+GLFh/9YW6S8 UUtY/EBxLyqZghtaMbGmHb+0WLgux1dp09dsN45YmNCdcJX6azq7mPPZk0FCIzjEGRQz QNTNnItCAcZe/MhIG3/g/sI1UGE7Wghjn7DGwacfrDiGCbqDfhliSLGwygdlRxZe39R2 yeJzzZ6W8Ax5Z9sQ6bvzyCbM8cSUjmK4zOZXXfiT85ZzM3mBwfahL9Ci1dydlmTFWaLs 081w== X-Gm-Message-State: ALoCoQnFMABURTILhI8KVD/4E2aMxJif+8RJWP0EkFTsiNJj1b50wVqz3vNJBS0u+bo18hV9c6XM X-Received: by 10.66.235.226 with SMTP id up2mr51458298pac.89.1441940635378; Thu, 10 Sep 2015 20:03:55 -0700 (PDT) Received: from localhost.localdomain ([202.130.115.78]) by smtp.gmail.com with ESMTPSA id ri9sm14626460pbc.4.2015.09.10.20.03.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Sep 2015 20:03:54 -0700 (PDT) From: WEN Pingbo To: dmitry.torokhov@gmail.com Cc: broonie@kernel.org, linux-input@vger.kernel.org, WEN Pingbo Subject: [PATCH 2/2] Input: lpc32xx: handle clk_enable return value Date: Fri, 11 Sep 2015 11:02:56 +0800 Message-Id: <1441940576-4972-2-git-send-email-pingbo.wen@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441940576-4972-1-git-send-email-pingbo.wen@linaro.org> References: <1441940576-4972-1-git-send-email-pingbo.wen@linaro.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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 If clk_enable failed, return the err code Signed-off-by: WEN Pingbo --- drivers/input/touchscreen/lpc32xx_ts.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index 24d704c..60cd31d 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c @@ -145,8 +145,14 @@ static void lpc32xx_stop_tsc(struct lpc32xx_tsc *tsc) static void lpc32xx_setup_tsc(struct lpc32xx_tsc *tsc) { u32 tmp; + int retval; - clk_enable(tsc->clk); + retval = clk_enable(tsc->clk); + if (retval) { + dev_err(&tsc->dev->dev, + "clk_enable failed, ret %d\n", retval); + return; + } tmp = tsc_readl(tsc, LPC32XX_TSC_CON) & ~LPC32XX_TSC_ADCCON_POWER_UP;