From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Sean Young" <sean@mess.org>,
"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
"Sasha Levin" <sashal@kernel.org>
Subject: [PATCH 6.6.y 2/3] media: meson-ir-tx: Simplify and improve using dev_err_probe()
Date: Mon, 9 Nov 2026 21:49:44 -0500 [thread overview]
Message-ID: <20261110024931.3828324-2-sashal@kernel.org> (raw)
In-Reply-To: <20261110024931.3828324-1-sashal@kernel.org>
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[ Upstream commit 9af7c980f3ea3e85418beb25dc4d34939183e436 ]
With dev_err_probe() the error paths can be implemented in a more
condensed way with the added benefit that the error code is added to the
error messages by name.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Stable-dep-of: 32999b8a9d5c ("media: meson-ir-tx: Ensure rc_free_device() is called on unbind")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/rc/meson-ir-tx.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index be353d22bbd7f..94208f76bb33a 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -337,20 +337,17 @@ static int __init meson_irtx_probe(struct platform_device *pdev)
spin_lock_init(&ir->lock);
ret = meson_irtx_mod_clock_probe(ir, &clk_nr);
- if (ret) {
- dev_err(dev, "modulator clock setup failed\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "modulator clock setup failed\n");
+
meson_irtx_setup(ir, clk_nr);
ret = devm_request_irq(dev, irq,
meson_irtx_irqhandler,
IRQF_TRIGGER_RISING,
DRIVER_NAME, ir);
- if (ret) {
- dev_err(dev, "irq request failed\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "irq request failed\n");
rc = rc_allocate_device(RC_DRIVER_IR_RAW_TX);
if (!rc)
@@ -366,9 +363,8 @@ static int __init meson_irtx_probe(struct platform_device *pdev)
ret = devm_rc_register_device(dev, rc);
if (ret < 0) {
- dev_err(dev, "rc_dev registration failed\n");
rc_free_device(rc);
- return ret;
+ return dev_err_probe(dev, ret, "rc_dev registration failed\n");
}
return 0;
--
2.53.0
next prev parent reply other threads:[~2026-11-10 2:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 10:28 FAILED: patch "[PATCH] media: meson-ir-tx: Ensure rc_free_device() is called on unbind" failed to apply to 6.6-stable tree Sasha Levin
2026-11-10 2:49 ` [PATCH 6.6.y 1/3] media: meson-ir-tx: Convert to use devm_rc_register_device() Sasha Levin
2026-11-10 2:49 ` Sasha Levin [this message]
2026-11-10 2:49 ` [PATCH 6.6.y 3/3] media: meson-ir-tx: Ensure rc_free_device() is called on unbind Sasha Levin
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=20261110024931.3828324-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=sean@mess.org \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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