Commit bc989391 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

[media] lirc: return ENOTTY when device does support ioctl

If timeouts or carrier range is not supported, return proper error.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 5c862758
......@@ -253,6 +253,9 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
val);
case LIRC_SET_REC_CARRIER_RANGE:
if (!dev->s_rx_carrier_range)
return -ENOTTY;
if (val <= 0)
return -EINVAL;
......@@ -305,6 +308,9 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
break;
case LIRC_SET_REC_TIMEOUT_REPORTS:
if (!dev->timeout)
return -ENOTTY;
lirc->send_timeout_reports = !!val;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment