Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280993
b: refs/heads/master
c: 4c3d153
h: refs/heads/master
i:
  280991: dcc3b86
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 1348a5b commit b0daf8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 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: e69616b1e65cb9d3dcf34399e8fac331911abfe5
refs/heads/master: 4c3d15358a7ffdd587acc02ec91d28989334d4be
9 changes: 1 addition & 8 deletions trunk/drivers/staging/iio/kfifo_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,9 @@ static int iio_store_to_kfifo(struct iio_buffer *r,
{
int ret;
struct iio_kfifo *kf = iio_to_kfifo(r);
u8 *datal = kmalloc(r->bytes_per_datum, GFP_KERNEL);
memcpy(datal, data, r->bytes_per_datum - sizeof(timestamp));
memcpy(datal + r->bytes_per_datum - sizeof(timestamp),
&timestamp, sizeof(timestamp));
ret = kfifo_in(&kf->kf, data, r->bytes_per_datum);
if (ret != r->bytes_per_datum) {
kfree(datal);
if (ret != r->bytes_per_datum)
return -EBUSY;
}
kfree(datal);
return 0;
}

Expand Down

0 comments on commit b0daf8c

Please sign in to comment.