This is a note to let you know that I've just added the patch titled media: lirc: drop trailing space from scancode transmit to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-lirc-drop-trailing-space-from-scancode-transmit.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c8a489f820179fb12251e262b50303c29de991ac Mon Sep 17 00:00:00 2001 From: Sean Young <sean@xxxxxxxx> Date: Fri, 6 Oct 2023 22:31:52 +0100 Subject: media: lirc: drop trailing space from scancode transmit From: Sean Young <sean@xxxxxxxx> commit c8a489f820179fb12251e262b50303c29de991ac upstream. When transmitting, infrared drivers expect an odd number of samples; iow without a trailing space. No problems have been observed so far, so this is just belt and braces. Fixes: 9b6192589be7 ("media: lirc: implement scancode sending") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Sean Young <sean@xxxxxxxx> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/media/rc/lirc_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -286,7 +286,11 @@ static ssize_t lirc_transmit(struct file if (ret < 0) goto out_kfree_raw; - count = ret; + /* drop trailing space */ + if (!(ret % 2)) + count = ret - 1; + else + count = ret; txbuf = kmalloc_array(count, sizeof(unsigned int), GFP_KERNEL); if (!txbuf) { Patches currently in stable-queue which might be from sean@xxxxxxxx are queue-5.10/media-sharp-fix-sharp-encoding.patch queue-5.10/media-imon-fix-access-to-invalid-resource-for-the-se.patch queue-5.10/media-lirc-drop-trailing-space-from-scancode-transmit.patch