Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232256
b: refs/heads/master
c: 88914bd
h: refs/heads/master
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Jan 19, 2011
1 parent 54b51ee commit db2a450
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 559d162e1ebcdb61e89f154f2c2db376af072b0e
refs/heads/master: 88914bdf8c677ebd7e797adac05e47303fd6ac77
1 change: 1 addition & 0 deletions trunk/drivers/staging/lirc/lirc_imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,

exit:
mutex_unlock(&context->ctx_lock);
kfree(data_buf);

return (!retval) ? n_bytes : retval;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/lirc/lirc_it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ static ssize_t lirc_write(struct file *file, const char *buf,
i++;
}
terminate_send(tx_buf[i - 1]);
kfree(tx_buf);
return n;
}

Expand Down
19 changes: 14 additions & 5 deletions trunk/drivers/staging/lirc/lirc_parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ static ssize_t lirc_write(struct file *filep, const char *buf, size_t n,
unsigned long flags;
int counttimer;
int *wbuf;
ssize_t ret;

if (!is_claimed)
return -EBUSY;
Expand All @@ -393,8 +394,10 @@ static ssize_t lirc_write(struct file *filep, const char *buf, size_t n,
if (timer == 0) {
/* try again if device is ready */
timer = init_lirc_timer();
if (timer == 0)
return -EIO;
if (timer == 0) {
ret = -EIO;
goto out;
}
}

/* adjust values from usecs */
Expand All @@ -420,7 +423,8 @@ static ssize_t lirc_write(struct file *filep, const char *buf, size_t n,
if (check_pselecd && (in(1) & LP_PSELECD)) {
lirc_off();
local_irq_restore(flags);
return -EIO;
ret = -EIO;
goto out;
}
} while (counttimer < wbuf[i]);
i++;
Expand All @@ -436,7 +440,8 @@ static ssize_t lirc_write(struct file *filep, const char *buf, size_t n,
level = newlevel;
if (check_pselecd && (in(1) & LP_PSELECD)) {
local_irq_restore(flags);
return -EIO;
ret = -EIO;
goto out;
}
} while (counttimer < wbuf[i]);
i++;
Expand All @@ -445,7 +450,11 @@ static ssize_t lirc_write(struct file *filep, const char *buf, size_t n,
#else
/* place code that handles write without external timer here */
#endif
return n;
ret = n;
out:
kfree(wbuf);

return ret;
}

static unsigned int lirc_poll(struct file *file, poll_table *wait)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/lirc/lirc_sasem.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
exit:

mutex_unlock(&context->ctx_lock);
kfree(data_buf);

return (!retval) ? n_bytes : retval;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/staging/lirc/lirc_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ static ssize_t lirc_write(struct file *file, const char *buf,
if (n % sizeof(int) || count % 2 == 0)
return -EINVAL;
wbuf = memdup_user(buf, n);
if (PTR_ERR(wbuf))
if (IS_ERR(wbuf))
return PTR_ERR(wbuf);
spin_lock_irqsave(&hardware[type].lock, flags);
if (type == LIRC_IRDEO) {
Expand All @@ -981,6 +981,7 @@ static ssize_t lirc_write(struct file *file, const char *buf,
}
off();
spin_unlock_irqrestore(&hardware[type].lock, flags);
kfree(wbuf);
return n;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/lirc/lirc_sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ static ssize_t lirc_write(struct file *file, const char *buf, size_t n,
/* enable receiver */
Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE;
#endif
kfree(tx_buf);
return count;
}

Expand Down

0 comments on commit db2a450

Please sign in to comment.