diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 04:21:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 04:21:35 +0000 |
commit | 7b642cd94bb96385cbdbb36a1952f129af6b1bbb (patch) | |
tree | e7c4209372da8a2fa745aaa3e99d062e54d0f556 /drivers/media/rc/lirc_dev.c | |
parent | Adding debian version 4.19.289-2. (diff) | |
download | linux-7b642cd94bb96385cbdbb36a1952f129af6b1bbb.tar.xz linux-7b642cd94bb96385cbdbb36a1952f129af6b1bbb.zip |
Merging upstream version 4.19.304.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index d6f5f5b3f..b71792f49 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -302,7 +302,11 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf, 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) { |