From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org, Sean Young <sean@mess.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 05/11] media: redrat3: Error path leaves device in transmitting state
Date: Mon, 13 Jul 2026 22:30:59 +0100 [thread overview]
Message-ID: <d8be8047def26d35726666fee2f3ca309da200ef.1783977550.git.sean@mess.org> (raw)
In-Reply-To: <cover.1783977550.git.sean@mess.org>
If the allocation fails, transmitting is left as true and the transmitter
cannot be used any more.
Signed-off-by: Sean Young <sean@mess.org>
---
drivers/media/rc/redrat3.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 468907d6c3a8..b64c6440b062 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -781,9 +781,6 @@ static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf,
if (count > RR3_MAX_SIG_SIZE - RR3_TX_TRAILER_LEN)
return -EINVAL;
- /* rr3 will disable rc detector on transmit */
- rr3->transmitting = true;
-
sample_lens = kzalloc_objs(*sample_lens, RR3_DRIVER_MAXLENS);
if (!sample_lens)
return -ENOMEM;
@@ -794,6 +791,9 @@ static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf,
goto out;
}
+ /* rr3 will disable rc detector on transmit */
+ rr3->transmitting = true;
+
for (i = 0; i < count; i++) {
cur_sample_len = redrat3_us_to_len(txbuf[i]);
if (cur_sample_len > 0xffff) {
--
2.55.0
next prev parent reply other threads:[~2026-07-13 21:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1783977550.git.sean@mess.org>
2026-07-13 21:30 ` [PATCH v2 01/11] media: streamzap: Add missing rc_unregister_device() Sean Young
2026-07-13 21:30 ` [PATCH v2 02/11] media: redrat3: Ensure rc device is freed if enable_detector() fails Sean Young
2026-07-13 21:30 ` [PATCH v2 03/11] media: redrat3: Ensure we don't read beyond the end of the packet Sean Young
2026-07-13 21:30 ` [PATCH v2 04/11] media: redrat3: Ensure all urbs are suspended Sean Young
2026-07-13 21:30 ` Sean Young [this message]
2026-07-13 21:31 ` [PATCH v2 06/11] media: sunxi-cir: Ensure no more interrupts can occur before free Sean Young
2026-07-13 21:31 ` [PATCH v2 07/11] media: meson-ir-tx: Ensure clock is disabled on unbind Sean Young
2026-07-13 21:31 ` [PATCH v2 08/11] media: meson-ir-tx: Ensure rc_free_device() is called " Sean Young
2026-07-13 21:31 ` [PATCH v2 09/11] media: meson-ir-tx: Ensure probe error is propagated Sean Young
2026-07-14 5:12 ` Martin Blumenstingl
2026-07-16 21:25 ` [PATCH v2 10/11] media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled Sean Young
2026-07-16 21:25 ` [PATCH v2 11/11] media: rc: Use after free in ir_raw_event_handle() 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=d8be8047def26d35726666fee2f3ca309da200ef.1783977550.git.sean@mess.org \
--to=sean@mess.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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