linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] memory: brcmstb_dpfe: Simplify with dev_err_probe()
@ 2020-08-28 15:37 Krzysztof Kozlowski
  2020-08-28 15:37 ` [PATCH 2/2] memory: tegra186-emc: " Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-28 15:37 UTC (permalink / raw)
  To: Markus Mayer, bcm-kernel-feedback-list, Krzysztof Kozlowski,
	Florian Fainelli, Thierry Reding, Jonathan Hunter,
	linux-arm-kernel, linux-kernel, linux-tegra

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/memory/brcmstb_dpfe.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c
index dcf50bb8dd69..f43ba69fbb3e 100644
--- a/drivers/memory/brcmstb_dpfe.c
+++ b/drivers/memory/brcmstb_dpfe.c
@@ -901,11 +901,8 @@ static int brcmstb_dpfe_probe(struct platform_device *pdev)
 	}
 
 	ret = brcmstb_dpfe_download_firmware(priv);
-	if (ret) {
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "Couldn't download firmware -- %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Couldn't download firmware\n");
 
 	ret = sysfs_create_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs);
 	if (!ret)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-02 15:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 15:37 [PATCH 1/2] memory: brcmstb_dpfe: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-08-28 15:37 ` [PATCH 2/2] memory: tegra186-emc: " Krzysztof Kozlowski
2020-09-02 15:23   ` Krzysztof Kozlowski
2020-08-28 16:12 ` [PATCH 1/2] memory: brcmstb_dpfe: " Markus Mayer
2020-08-28 17:11 ` Florian Fainelli
2020-09-02 15:22 ` Krzysztof Kozlowski

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).