From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org, Sean Young <sean@mess.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] media: rc: Do not touch rx state when unregistering a tx-only device
Date: Sun, 25 Oct 2026 18:13:43 +0000 [thread overview]
Message-ID: <984d752bd365cbc5b787dee31cb4738cabc581b2.1792951808.git.sean@mess.org> (raw)
In-Reply-To: <cover.1792951808.git.sean@mess.org>
Only tear down the rx state for devices which have it.
Fixes: ab9567336171 ("media: rc: Add missing locking for keymap")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Young <sean@mess.org>
---
drivers/media/rc/rc-main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index f8cc7e4a3d95..c36a62992b76 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -2071,10 +2071,12 @@ void rc_unregister_device(struct rc_dev *dev)
if (dev->driver_type == RC_DRIVER_IR_RAW)
ir_raw_event_unregister(dev);
- timer_delete_sync(&dev->timer_keyup);
- timer_delete_sync(&dev->timer_repeat);
+ if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
+ timer_delete_sync(&dev->timer_keyup);
+ timer_delete_sync(&dev->timer_repeat);
- rc_free_rx_device(dev);
+ rc_free_rx_device(dev);
+ }
/*
* lirc device should be freed with dev->registered = false, so
--
2.56.0
next prev parent reply other threads:[~2026-10-25 18:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1792951808.git.sean@mess.org>
2026-10-25 18:13 ` [PATCH 1/5] media: rc: Remove pointless msleep() after request_module() Sean Young
2026-10-25 18:13 ` [PATCH 2/5] media: rc: Prevent overflow in ir_raw_event_store_edge() Sean Young
2026-10-25 18:13 ` Sean Young [this message]
2026-10-25 18:13 ` [PATCH 4/5] media: imon: Replace pr_err() with dev_err() and friends Sean Young
2026-10-25 18:13 ` [PATCH 5/5] media: rc: struct rc_map should have entries and capacity 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=984d752bd365cbc5b787dee31cb4738cabc581b2.1792951808.git.sean@mess.org \
--to=sean@mess.org \
--cc=hverkuil+cisco@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.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®