[git:media_stage/master] media: rc-loopback: return number of emitters rather than error

From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Date: 2021-07-22 06:24:04
Subsystem: media input infrastructure (v4l/dvb), rc-core / lirc framework, the rest · Maintainers: Mauro Carvalho Chehab, Sean Young, Linus Torvalds

This is an automatic generated email to let you know that the following patch were queued:

Subject: media: rc-loopback: return number of emitters rather than error
Author:  Sean Young [off-list ref]
Date:    Sat Jul 3 15:37:17 2021 +0200

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>

 drivers/media/rc/rc-loopback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---
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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help