linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	David Lechner <david@lechnology.com>,
	Sekhar Nori <nsekhar@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-msm@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 07/10] clk: meson: Simplify with dev_err_probe()
Date: Wed,  2 Sep 2020 17:03:45 +0200	[thread overview]
Message-ID: <20200902150348.14465-7-krzk@kernel.org> (raw)
In-Reply-To: <20200902150348.14465-1-krzk@kernel.org>

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/clk/meson/axg-audio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/meson/axg-audio.c b/drivers/clk/meson/axg-audio.c
index 53715e36326c..dc22b0c45743 100644
--- a/drivers/clk/meson/axg-audio.c
+++ b/drivers/clk/meson/axg-audio.c
@@ -1509,12 +1509,8 @@ static int devm_clk_get_enable(struct device *dev, char *id)
 	int ret;
 
 	clk = devm_clk_get(dev, id);
-	if (IS_ERR(clk)) {
-		ret = PTR_ERR(clk);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "failed to get %s", id);
-		return ret;
-	}
+	if (IS_ERR(clk))
+		return dev_err_probe(dev, PTR_ERR(clk), "failed to get %s", id);
 
 	ret = clk_prepare_enable(clk);
 	if (ret) {
-- 
2.17.1


  parent reply	other threads:[~2020-09-02 15:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 15:03 [PATCH 01/10] clk: at91: Drop unused at91sam9g45_pcr_layout Krzysztof Kozlowski
2020-09-02 15:03 ` [PATCH 02/10] clk: fixed: Add missing kerneldoc Krzysztof Kozlowski
2020-09-02 15:03 ` [PATCH 03/10] clk: bulk: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-02 15:03 ` [PATCH 04/10] clk: gpio: " Krzysztof Kozlowski
2020-09-10 22:01   ` Stephen Boyd
2020-09-11 15:29     ` Krzysztof Kozlowski
2020-09-02 15:03 ` [PATCH 05/10] clk: sunxi-ng: " Krzysztof Kozlowski
2020-09-02 15:03 ` [PATCH 06/10] clk: keystone: " Krzysztof Kozlowski
2020-09-02 15:03 ` Krzysztof Kozlowski [this message]
2020-09-07  8:30   ` [PATCH 07/10] clk: meson: " Jerome Brunet
2020-09-02 15:03 ` [PATCH 08/10] clk: qcom: " Krzysztof Kozlowski
2020-09-02 15:03 ` [PATCH 09/10] clk: davinci: Add missing kerneldoc Krzysztof Kozlowski
2020-09-02 15:37   ` David Lechner
2020-09-02 15:03 ` [PATCH 10/10] clk: davinci: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-02 15:37   ` David Lechner
2020-09-02 16:35 ` [PATCH 01/10] clk: at91: Drop unused at91sam9g45_pcr_layout Alexandre Belloni
2020-09-11 15:34   ` Krzysztof Kozlowski
2020-09-15  0:01     ` Stephen Boyd
2020-09-16 16:15       ` Krzysztof Kozlowski

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=20200902150348.14465-7-krzk@kernel.org \
    --to=krzk@kernel.org \
    --cc=agross@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=david@lechnology.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=narmstrong@baylibre.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=nsekhar@ti.com \
    --cc=sboyd@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=wens@csie.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).