diff options
author | Sean Young <sean@mess.org> | 2017-01-20 00:44:00 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 12:30:22 +0300 |
commit | f348b4d323a67a5639ccbd3de5add5383573e4a5 (patch) | |
tree | b10568789831bc5e3caf9547001c48a8a895a6a6 /drivers/media/rc/ir-lirc-codec.c | |
parent | 8caebcdc53c9716ed6ae493aa6c0b1d3a67f0d5d (diff) | |
download | linux-f348b4d323a67a5639ccbd3de5add5383573e4a5.tar.xz |
[media] lirc: LIRC_GET_MIN_TIMEOUT should be in range
LIRC_SET_REC_TIMEOUT can fail if the value returned by
LIRC_GET_MIN_TIMEOUT is set due to rounding errors.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ir-lirc-codec.c')
-rw-r--r-- | drivers/media/rc/ir-lirc-codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index e944507fc4f5..8517d5153fcf 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -279,7 +279,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, case LIRC_GET_MIN_TIMEOUT: if (!dev->max_timeout) return -ENOSYS; - val = dev->min_timeout / 1000; + val = DIV_ROUND_UP(dev->min_timeout, 1000); break; case LIRC_GET_MAX_TIMEOUT: |