From: Batu Ada Tutkun <batuadatutkun@gmail.com>
To: parthiban.veerasooran@microchip.com, christian.gromm@microchip.com
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Batu Ada Tutkun <batuadatutkun@gmail.com>
Subject: [PATCH] staging: most: dim2: use dev_err_probe() for clock errors in rcar enable functions
Date: Tue, 23 Jun 2026 15:42:43 +0300 [thread overview]
Message-ID: <20260623124243.1245-1-batuadatutkun@gmail.com> (raw)
rcar_gen2_enable() and rcar_gen3_enable() use the old pattern of
dev_err() followed by return PTR_ERR() when devm_clk_get() fails.
fsl_mx6_enable() in the same file was already converted to use
dev_err_probe() by a previous cleanup series.
Convert the remaining two functions for consistency. devm_clk_get()
can return -EPROBE_DEFER, so dev_err_probe() is appropriate here: it
suppresses the log message at error level when the failure is a deferred
probe, avoiding misleading output during normal boot.
Signed-off-by: Batu Ada Tutkun <batuadatutkun@gmail.com>
---
drivers/staging/most/dim2/dim2.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 7953d4626..56f856d6d 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -974,10 +974,9 @@ static int rcar_gen2_enable(struct platform_device *pdev)
int ret;
dev->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(dev->clk)) {
- dev_err(&pdev->dev, "cannot get clock\n");
- return PTR_ERR(dev->clk);
- }
+ if (IS_ERR(dev->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(dev->clk),
+ "cannot get clock\n");
ret = clk_prepare_enable(dev->clk);
if (ret) {
@@ -1019,10 +1018,9 @@ static int rcar_gen3_enable(struct platform_device *pdev)
int ret;
dev->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(dev->clk)) {
- dev_err(&pdev->dev, "cannot get clock\n");
- return PTR_ERR(dev->clk);
- }
+ if (IS_ERR(dev->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(dev->clk),
+ "cannot get clock\n");
ret = clk_prepare_enable(dev->clk);
if (ret) {
--
2.53.0
next reply other threads:[~2026-06-23 12:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 12:42 Batu Ada Tutkun [this message]
2026-06-23 12:35 ` [PATCH v2] staging: most: dim2: use dev_err_probe() for clock errors in rcar enable functions Batu Ada Tutkun
2026-06-23 13:16 ` [PATCH] " Dan Carpenter
2026-06-23 17:41 ` Batu Ada Tutkun
2026-06-23 18:35 ` Dan Carpenter
2026-06-23 19:46 ` [PATCH v2] " Batu Ada Tutkun
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=20260623124243.1245-1-batuadatutkun@gmail.com \
--to=batuadatutkun@gmail.com \
--cc=christian.gromm@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=parthiban.veerasooran@microchip.com \
/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