[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170403231916.22881-1-lexszero@gmail.com>
Date: Tue, 4 Apr 2017 02:19:16 +0300
From: Alexey Ignatov <lexszero@...il.com>
To: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Andi Shyti <andi.shyti@...sung.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Alexey Ignatov <lexszero@...il.com>
Subject: [PATCH] [media] lirc_dev: fix regression in feature check logic in ioctl
Commit 273b902a5b1bfd6977a73c4de3eb96db3cb103cb removed inversion in
features check conditionals (by accident, perhaps). That change resulted
in erroneous reporting that device can't receive while actually it can.
Fix this.
Signed-off-by: Alexey Ignatov <lexszero@...il.com>
---
drivers/media/rc/lirc_dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index e65bc9fd1d23..cd07af05be69 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -591,7 +591,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
result = put_user(ir->d.features, (__u32 __user *)arg);
break;
case LIRC_GET_REC_MODE:
- if (LIRC_CAN_REC(ir->d.features)) {
+ if (!LIRC_CAN_REC(ir->d.features)) {
result = -ENOTTY;
break;
}
@@ -601,7 +601,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
(__u32 __user *)arg);
break;
case LIRC_SET_REC_MODE:
- if (LIRC_CAN_REC(ir->d.features)) {
+ if (!LIRC_CAN_REC(ir->d.features)) {
result = -ENOTTY;
break;
}
--
2.11.0
Powered by blists - more mailing lists