From patchwork Fri Sep 11 03:02:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingbo Wen X-Patchwork-Id: 53401 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 527FC22B19 for ; Fri, 11 Sep 2015 03:03:58 +0000 (UTC) Received: by lbcjc2 with SMTP id jc2sf19932208lbc.0 for ; Thu, 10 Sep 2015 20:03:56 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=HnETGVCR+0FxMtFocstKG41SqXFt2L8zLIufaAX0DVo=; b=h2x6gDBs+rKxyBCflFBxv/duR82Ria2pmWk1GyGtk65TnjbJOZqtnVo9W04Zm0+MmJ gvmQOEPUHf8j04Y0FYnCZL0+q8mF5BhkDohc+1LMG8uPXwfGGwAYPhNTMhAhNIuAvJ5L s09oMvMbgEdcp9CBTMdFIe8jYh79Weg96O6VABsIpf7ClcJz7gmtVy+uJQ18FEWA7aKJ GIrImBfJduANg7NLknk174D/QTJtZjR/s6Zpunh+VoAtrG1tvd2eo7vrqsgJWW2BRmc3 r3R9DFLHXVMFFR0HP5HgyYzWbQ8rdlka/+ig/IBkn/ZisWLO92Fz1V0t5McpcM6tEMN3 9Ssw== X-Gm-Message-State: ALoCoQlfSHLEMnSwFYIWnqum4ZUad6wnyd2sGDfATqdU9T2mLPnetJjpubvMmbBcy2mEf79eomyc X-Received: by 10.180.81.165 with SMTP id b5mr1738039wiy.1.1441940636411; Thu, 10 Sep 2015 20:03:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.193 with SMTP id s1ls11124laj.62.gmail; Thu, 10 Sep 2015 20:03:56 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr40143523lbb.56.1441940636240; Thu, 10 Sep 2015 20:03:56 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id zs5si12377060lbb.37.2015.09.10.20.03.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Sep 2015 20:03:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lagj9 with SMTP id j9so40464875lag.2 for ; Thu, 10 Sep 2015 20:03:55 -0700 (PDT) X-Received: by 10.152.5.198 with SMTP id u6mr281249lau.76.1441940635807; Thu, 10 Sep 2015 20:03:55 -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 w3csp1316532lbq; Thu, 10 Sep 2015 20:03:54 -0700 (PDT) X-Received: by 10.68.238.161 with SMTP id vl1mr6747952pbc.114.1441940634816; Thu, 10 Sep 2015 20:03:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pi6si23632520pbb.92.2015.09.10.20.03.54 for ; Thu, 10 Sep 2015 20:03:54 -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 S1751361AbbIKDDx (ORCPT ); Thu, 10 Sep 2015 23:03:53 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35873 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbbIKDDw (ORCPT ); Thu, 10 Sep 2015 23:03:52 -0400 Received: by padhk3 with SMTP id hk3so60892376pad.3 for ; Thu, 10 Sep 2015 20:03:52 -0700 (PDT) X-Received: by 10.66.243.70 with SMTP id ww6mr82040677pac.88.1441940632448; Thu, 10 Sep 2015 20:03:52 -0700 (PDT) Received: from localhost.localdomain ([202.130.115.78]) by smtp.gmail.com with ESMTPSA id ri9sm14626460pbc.4.2015.09.10.20.03.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Sep 2015 20:03:51 -0700 (PDT) From: WEN Pingbo To: dmitry.torokhov@gmail.com Cc: broonie@kernel.org, linux-input@vger.kernel.org, WEN Pingbo Subject: [PATCH 1/2] Input: at32psif: handle clk_enable return value Date: Fri, 11 Sep 2015 11:02:55 +0800 Message-Id: <1441940576-4972-1-git-send-email-pingbo.wen@linaro.org> X-Mailer: git-send-email 1.9.1 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.53 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 2e4ff5b..aebb996 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,10 @@ 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); psif_writel(psif, PSR, prscv); clk_disable(psif->pclk); }