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 06/10] clk: keystone: Simplify with dev_err_probe()
Date: Wed,  2 Sep 2020 17:03:44 +0200	[thread overview]
Message-ID: <20200902150348.14465-6-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/keystone/syscon-clk.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c
index 5b3d36462174..12ddcbed00e4 100644
--- a/drivers/clk/keystone/syscon-clk.c
+++ b/drivers/clk/keystone/syscon-clk.c
@@ -102,12 +102,9 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	regmap = syscon_node_to_regmap(dev->of_node);
-	if (IS_ERR(regmap)) {
-		if (PTR_ERR(regmap) == -EPROBE_DEFER)
-			return -EPROBE_DEFER;
-		dev_err(dev, "failed to find parent regmap\n");
-		return PTR_ERR(regmap);
-	}
+	if (IS_ERR(regmap))
+		return dev_err_probe(dev, PTR_ERR(regmap),
+				     "failed to find parent regmap\n");
 
 	num_clks = 0;
 	for (p = data; p->name; p++)
-- 
2.17.1


  parent reply	other threads:[~2020-09-02 15:35 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 ` Krzysztof Kozlowski [this message]
2020-09-02 15:03 ` [PATCH 07/10] clk: meson: " Krzysztof Kozlowski
2020-09-07  8:30   ` 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-6-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).