From patchwork Thu Jul 13 21:06:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9839543 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E873D602BD for ; Thu, 13 Jul 2017 18:05:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60E9F25F3E for ; Thu, 13 Jul 2017 21:07:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53E5F28756; Thu, 13 Jul 2017 21:07:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAF3A2875E for ; Thu, 13 Jul 2017 21:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752805AbdGMVHK (ORCPT ); Thu, 13 Jul 2017 17:07:10 -0400 Received: from sauhun.de ([88.99.104.3]:49593 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752641AbdGMVHH (ORCPT ); Thu, 13 Jul 2017 17:07:07 -0400 Received: from localhost (p54B33A70.dip0.t-ipconnect.de [84.179.58.112]) by pokefinder.org (Postfix) with ESMTPSA id D8F8E2C3068; Thu, 13 Jul 2017 23:07:05 +0200 (CEST) From: Wolfram Sang To: linux-clk@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven , Takeshi Kihara , Wolfram Sang Subject: [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate Date: Thu, 13 Jul 2017 23:06:56 +0200 Message-Id: <20170713210656.31911-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara In .recalc_rate of struct clk_ops, it is desirable to return 0 if an error occurs, but -EINVAL is returned. This patch fixes it. Fixes: 5b1defde7054 ("clk: renesas: cpg-mssr: Extract common R-Car Gen3 support code") Signed-off-by: Takeshi Kihara Signed-off-by: Wolfram Sang --- Totally valid patch forwarded from BSP. drivers/clk/renesas/rcar-gen3-cpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c index 3dee900522b703..e7371a8c4eb701 100644 --- a/drivers/clk/renesas/rcar-gen3-cpg.c +++ b/drivers/clk/renesas/rcar-gen3-cpg.c @@ -147,7 +147,7 @@ static unsigned long cpg_sd_clock_recalc_rate(struct clk_hw *hw, break; if (i >= clock->div_num) - return -EINVAL; + return 0; return DIV_ROUND_CLOSEST(rate, clock->div_table[i].div); }