From patchwork Fri Sep 11 03:34:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingbo Wen X-Patchwork-Id: 53403 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 12D6622B19 for ; Fri, 11 Sep 2015 03:35:43 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf14065437wic.2 for ; Thu, 10 Sep 2015 20:35:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=suTcPfLsGx3DkTs2FdX4Arri/T78yOvZDELQNfgX/UM=; b=B+C/R8JD0qZgzwINTcT7DaJc6iOlda5mDztbtFir3RDA7i71TG/GFvuB57J+3jtLrT si4QbhpCYerceSq38xwEf2cFGEIwg4PaA/0zCiVW5DMcNid9I79wBI+bmXUcbjDWpAv8 eYuQibm6/6TAFE8zXC6ssSZNe0/IV3hPkwhxGtnWiWufErnee96UOeYBqW8VvNGVcU77 XLVcFfqvyK/nJDaBwJmwIVx4Y1L9zUrOlvkPtpmbVPQrRwYEOSFMmY4pgHPXMr7ueK/r GTkk3uMgk1lci8aDyuXTeN/IUkInaYJ6TpVy9RSdWRmoZmrGgNvflB7HQ56nXL9Kgjv5 +0QQ== X-Gm-Message-State: ALoCoQl6kZ69aPDp02oHFbpvVmKXrK/k1YnloQBrTTja7iGbx3lXJcVxIK4YnkoLCtQ74MdpRPuF X-Received: by 10.112.170.67 with SMTP id ak3mr10619520lbc.6.1441942542317; Thu, 10 Sep 2015 20:35:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.200 with SMTP id o8ls311679laf.3.gmail; Thu, 10 Sep 2015 20:35:42 -0700 (PDT) X-Received: by 10.112.16.67 with SMTP id e3mr29349037lbd.5.1441942542171; Thu, 10 Sep 2015 20:35:42 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id o2si12440832laj.26.2015.09.10.20.35.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Sep 2015 20:35:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lahg1 with SMTP id g1so9907372lah.1 for ; Thu, 10 Sep 2015 20:35:42 -0700 (PDT) X-Received: by 10.152.22.133 with SMTP id d5mr39463511laf.112.1441942542031; Thu, 10 Sep 2015 20:35:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1326037lbq; Thu, 10 Sep 2015 20:35:41 -0700 (PDT) X-Received: by 10.107.3.170 with SMTP id e42mr79371ioi.72.1441942541175; Thu, 10 Sep 2015 20:35:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4si8588437igh.84.2015.09.10.20.35.40 for ; Thu, 10 Sep 2015 20:35:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751066AbbIKDfj (ORCPT ); Thu, 10 Sep 2015 23:35:39 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36353 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbbIKDfj (ORCPT ); Thu, 10 Sep 2015 23:35:39 -0400 Received: by padhk3 with SMTP id hk3so61633316pad.3 for ; Thu, 10 Sep 2015 20:35:39 -0700 (PDT) X-Received: by 10.68.190.38 with SMTP id gn6mr90487954pbc.125.1441942538991; Thu, 10 Sep 2015 20:35:38 -0700 (PDT) Received: from localhost.localdomain ([202.130.115.78]) by smtp.gmail.com with ESMTPSA id qh2sm14734331pbc.7.2015.09.10.20.35.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Sep 2015 20:35:38 -0700 (PDT) From: WEN Pingbo To: dmitry.torokhov@gmail.com Cc: broonie@kernel.org, linux-input@vger.kernel.org, WEN Pingbo Subject: [PATCH V2 1/2] Input: at32psif: handle clk_enable return value Date: Fri, 11 Sep 2015 11:34:50 +0800 Message-Id: <1441942490-5980-1-git-send-email-pingbo.wen@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-input-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pingbo.wen@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , We should print the err if clk_enable failed. Signed-off-by: WEN Pingbo --- drivers/input/serio/at32psif.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 2e4ff5b..38862a8 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c @@ -185,6 +185,7 @@ static void psif_set_prescaler(struct psif *psif) { unsigned long prscv; unsigned long rate = clk_get_rate(psif->pclk); + int retval; /* PRSCV = Pulse length (100 us) * PSIF module frequency. */ prscv = 100 * (rate / 1000000UL); @@ -195,7 +196,12 @@ static void psif_set_prescaler(struct psif *psif) "prescaler set to max\n"); } - clk_enable(psif->pclk); + retval = clk_enable(psif->pclk); + if (retval < 0) { + dev_err(&psif->pdev->dev, + "could not enable pclk, ret %d\n", retval); + return; + } psif_writel(psif, PSR, prscv); clk_disable(psif->pclk); }