diff options
author | Sean Young <sean@mess.org> | 2013-07-08 17:33:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-07-30 17:04:23 -0300 |
commit | 671ea6707b3fb051ec1bae8e7aa0a91f90e178e0 (patch) | |
tree | b403d588b2f200677d6be3a34c859b43aa347c64 /drivers/media/rc/iguanair.c | |
parent | 25379bf8bc4d4e83bd74d823048b85a95ae5a521 (diff) | |
download | linux-671ea6707b3fb051ec1bae8e7aa0a91f90e178e0.tar.bz2 |
[media] lirc: make transmit interface consistent
All lirc drivers that can transmit, return EINVAL when they are passed
more than IR data than they can send. That is, except for two drivers
which I touched.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/rc/iguanair.c')
-rw-r--r-- | drivers/media/rc/iguanair.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index a4ab2e6b3f82..19632b1c2190 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -364,8 +364,8 @@ static int iguanair_tx(struct rc_dev *dev, unsigned *txbuf, unsigned count) periods = DIV_ROUND_CLOSEST(txbuf[i] * ir->carrier, 1000000); bytes = DIV_ROUND_UP(periods, 127); if (size + bytes > ir->bufsize) { - count = i; - break; + rc = -EINVAL; + goto out; } while (periods > 127) { ir->packet->payload[size++] = 127 | space; |