All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Rich Felker <dalias@libc.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: linux-sh@vger.kernel.org, linux-clk@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] sh: clk: Fix clk_enable() to return 0 on NULL clk
Date: Thu, 02 Feb 2023 15:17:41 -0800	[thread overview]
Message-ID: <dd8ca920edbe54374b4bd4b82b65e9f6.sboyd@kernel.org> (raw)
In-Reply-To: <b53e6b557b4240579933b3359dda335ff94ed5af.1675354849.git.geert+renesas@glider.be>

Quoting Geert Uytterhoeven (2023-02-02 08:20:55)
> On SH, devm_clk_get_optional_enabled() fails with -EINVAL if the clock
> is not found.  This happens because __devm_clk_get() assumes it can pass
> a NULL clock pointer (as returned by clk_get_optional()) to the init()
> function (clk_prepare_enable() in this case), while the SH
> implementation of clk_enable() considers that an error.
> 
> Fix this by making the SH clk_enable() implementation return zero
> instead, like the Common Clock Framework does.
> 
> Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

      parent reply	other threads:[~2023-02-02 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 16:20 [PATCH] sh: clk: Fix clk_enable() to return 0 on NULL clk Geert Uytterhoeven
2023-02-02 16:28 ` John Paul Adrian Glaubitz
2023-02-02 23:17 ` Stephen Boyd [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd8ca920edbe54374b4bd4b82b65e9f6.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=dalias@libc.org \
    --cc=geert+renesas@glider.be \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.