summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2021-07-03 15:37:17 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-07-22 08:19:17 +0200
commit6b7f554be8c92319d7e6df92fd247ebb9beb4a45 (patch)
treee8c8b4e8b2fb55596ece7b197da5977b31582ba0 /drivers
parent379e205dab9d7f9761984728e7d6f5f8305cc424 (diff)
downloadlinux-6b7f554be8c92319d7e6df92fd247ebb9beb4a45.tar.bz2
media: rc-loopback: return number of emitters rather than error
The LIRC_SET_TRANSMITTER_MASK ioctl should return the number of emitters if an invalid list was set. Cc: stable@vger.kernel.org Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/rc/rc-loopback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c
index 1ba3f96ffa7d..40ab66c850f2 100644
--- a/drivers/media/rc/rc-loopback.c
+++ b/drivers/media/rc/rc-loopback.c
@@ -42,7 +42,7 @@ static int loop_set_tx_mask(struct rc_dev *dev, u32 mask)
if ((mask & (RXMASK_REGULAR | RXMASK_LEARNING)) != mask) {
dprintk("invalid tx mask: %u\n", mask);
- return -EINVAL;
+ return 2;
}
dprintk("setting tx mask: %u\n", mask);