mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org, Sean Young <sean@mess.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Guoxiong Yan <yanguoxiong@huawei.com>,
	Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 10/15] media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled
Date: Wed, 29 Jul 2026 16:22:48 +0100	[thread overview]
Message-ID: <b8b3a9bcaaae0c46c81cb40310cd5599decf488c.1785338381.git.sean@mess.org> (raw)
In-Reply-To: <cover.1785338381.git.sean@mess.org>

Once the interrupt handler is enabled, priv->rdev can be used. Ensure
it is setup correctly so there is no race condition.

Fixes: a84fcdaa9058 ("[media] rc: Introduce hix5hd2 IR transmitter driver")
Signed-off-by: Sean Young <sean@mess.org>
Cc: stable@vger.kernel.org
---
 drivers/media/rc/ir-hix5hd2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
index 1b061e4a3dcf..aa3de4d57a58 100644
--- a/drivers/media/rc/ir-hix5hd2.c
+++ b/drivers/media/rc/ir-hix5hd2.c
@@ -316,6 +316,9 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto clkerr;
 
+	priv->rdev = rdev;
+	priv->dev = dev;
+
 	if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
 			     0, pdev->name, priv) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", priv->irq);
@@ -323,8 +326,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 		goto regerr;
 	}
 
-	priv->rdev = rdev;
-	priv->dev = dev;
 	platform_set_drvdata(pdev, priv);
 
 	return ret;
-- 
2.55.0


  parent reply	other threads:[~2026-07-29 15:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1785338381.git.sean@mess.org>
2026-07-29 15:22 ` [PATCH v5 01/15] media: streamzap: Add missing rc_unregister_device() Sean Young
2026-07-29 15:22 ` [PATCH v5 02/15] media: redrat3: Ensure rc device is freed if enable_detector() fails Sean Young
2026-07-29 15:22 ` [PATCH v5 03/15] media: redrat3: Ensure we don't read beyond the end of the packet Sean Young
2026-07-29 15:22 ` [PATCH v5 04/15] media: redrat3: Ensure all urbs are suspended Sean Young
2026-07-29 15:22 ` [PATCH v5 05/15] media: redrat3: Error path leaves device in transmitting state Sean Young
2026-07-29 15:35   ` Markus Elfring
2026-07-30  5:17   ` Markus Elfring
2026-07-29 15:22 ` [PATCH v5 06/15] media: sunxi-cir: Ensure no more interrupts can occur before free Sean Young
2026-07-29 15:22 ` [PATCH v5 07/15] media: meson-ir-tx: Ensure clock is disabled on unbind Sean Young
2026-07-29 15:22 ` [PATCH v5 08/15] media: meson-ir-tx: Ensure rc_free_device() is called " Sean Young
2026-07-29 15:22 ` [PATCH v5 09/15] media: meson-ir-tx: Ensure probe error is propagated Sean Young
2026-07-29 15:22 ` Sean Young [this message]
2026-07-29 15:22 ` [PATCH v5 11/15] media: cx88: Specify rc type at rc_allocate_type() Sean Young
2026-07-29 15:22 ` [PATCH v5 12/15] media: saa7134: " Sean Young
2026-07-29 15:22 ` [PATCH v5 13/15] media: rc: Fix race condition during rc_register_device() Sean Young
2026-07-29 15:22 ` [PATCH v5 14/15] media: rc: Use after free in ir_raw_event_handle() Sean Young
2026-07-29 15:22 ` [PATCH v5 15/15] media: rc: Fix use after free in bpf progs Sean Young

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=b8b3a9bcaaae0c46c81cb40310cd5599decf488c.1785338381.git.sean@mess.org \
    --to=sean@mess.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yanguoxiong@huawei.com \
    --cc=zhangfei.gao@linaro.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

all inboxes | Powered by JetHome®