[media] rc: transmit on device which does not support it should fail

Currently write() will return 0 if an IR device does not support sending.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Sean Young 2012-08-13 08:59:49 -03:00 committed by Mauro Carvalho Chehab
parent 4da212e2ff
commit d07df223ab
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
struct lirc_codec *lirc;
struct rc_dev *dev;
unsigned int *txbuf; /* buffer with values to transmit */
ssize_t ret = 0;
ssize_t ret = -EINVAL;
size_t count;
lirc = lirc_get_pdata(file);