From patchwork Wed Apr 19 17:46:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 9688507 X-Patchwork-Delegate: geert@linux-m68k.org 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 45EA6602DC for ; Wed, 19 Apr 2017 17:48:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C7C628387 for ; Wed, 19 Apr 2017 17:48:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 313E928433; Wed, 19 Apr 2017 17:48:18 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 B4CED28387 for ; Wed, 19 Apr 2017 17:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968724AbdDSRsR (ORCPT ); Wed, 19 Apr 2017 13:48:17 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:33629 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968694AbdDSRsQ (ORCPT ); Wed, 19 Apr 2017 13:48:16 -0400 Received: by mail-io0-f196.google.com with SMTP id k87so5595233ioi.0; Wed, 19 Apr 2017 10:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MXAYzTdgqrUh6V2G7D/60FdAfI8JCnTHQ6P/dQme0Rw=; b=IBTtINRjdC/KhUueo1aJ97wbZ2Z0W4FwQwIc/vd2Z27YDAFVCYBp6QoukIjKdZsgqh J8jXMR200GmQvt5LW5XJPK9/o55ekrklPSa0Xd4KBCJ+H0nu5boYHUKgwdE4OSTKrUaZ xVTsOqnRjeONZI6yO9pRGTrj3hHBtXaWp2yNPPEyv5FzMSbKS6lTAmDslzmz1Ze5pbdC Q7SAeg77p/Fw9LIXx86ilxIGpv5moeuvlu+2X5n2/glWsR7fB4G6ZpMiC9VM+MymQVmw he6VpFlZ6eo5p5nuNTwdky5IusfbL2lUSQ+c252QndwR6uQ0t+Vtu7LCIU0PmUEqdttq 6hRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MXAYzTdgqrUh6V2G7D/60FdAfI8JCnTHQ6P/dQme0Rw=; b=t75de8QyQLqnt9nuLXF09B+Gf+6VtTpuxDGnsgKXdePtK9HjwxJ0qMn1YgTm2i9AMi DoRPoaxVuSqbbLS+r05heksWffTI1mC+R7JYW5iOdInh66Z/Uu0kYL1MB9w0LqUPFpxL 4F0jZUcre6yzHCyIGyN/AMoAGuxXqXkRButLxvnl7sGsda0boSOqp+sHLatXZ74oW/YM b+yXlzJGRGhmG2k2JJS6L4GOGwCdSF99tJEjUZaaPpyKmqTxDuizx1p8IE10x3YTtlAQ VuxaLGHgsbXd7F1hKQKAaYlHQxjhlQ1dzgdjP1V/fN/Jnvwro6l94vxHVF1UJ9jAWmQu 3ElA== X-Gm-Message-State: AN3rC/6OBmM+fdrXNOFpkCdXcb1wpVW1rmlu8fwPKv/Eut/73hOQZq5d 9vs14iDhiB5lNg== X-Received: by 10.98.15.73 with SMTP id x70mr4172716pfi.86.1492624095703; Wed, 19 Apr 2017 10:48:15 -0700 (PDT) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by smtp.gmail.com with ESMTPSA id x68sm5760574pgx.57.2017.04.19.10.48.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 10:48:15 -0700 (PDT) From: Yoshihiro Kaneko To: linux-clk@vger.kernel.org Cc: Michael Turquette , Stephen Boyd , Geert Uytterhoeven , Simon Horman , Magnus Damm , linux-renesas-soc@vger.kernel.org Subject: [PATCH] clk: renesas: rcar-gen3: Fix error return code in cpg_sd_clock_recalc_rate Date: Thu, 20 Apr 2017 02:46:33 +0900 Message-Id: <1492624001-3758-13-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@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: Yoshihiro Kaneko Reviewed-by: Wolfram Sang --- This patch is based on the clk-next branch of linux-clk tree. 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 4ab76b1..48c6e98 100644 --- a/drivers/clk/renesas/rcar-gen3-cpg.c +++ b/drivers/clk/renesas/rcar-gen3-cpg.c @@ -287,7 +287,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); }