diff options
author | Jonathan Cameron <jic23@kernel.org> | 2014-08-08 10:43:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-08-08 12:22:06 +0200 |
commit | 7cdca1784c6e1c9bacf053847676df53eec7b5ea (patch) | |
tree | 37aa70aed6368e886210ded547fb9f85961ac4f5 /drivers/iio/industrialio-buffer.c | |
parent | iio: adc: exynos_adc: Add support for s3c24xx ADC (diff) | |
download | linux-7cdca1784c6e1c9bacf053847676df53eec7b5ea.tar.xz linux-7cdca1784c6e1c9bacf053847676df53eec7b5ea.zip |
iio:buffer: Wrong sized allocation of demux table elements.
The size of the allocation is currently set to the size of the pointer
rather than the structure we should actually be allocating.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: kbuild@01.org
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'drivers/iio/industrialio-buffer.c')
-rw-r--r-- | drivers/iio/industrialio-buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 84a952931f9f..ec82cb0bea38 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -951,7 +951,7 @@ static int iio_buffer_add_demux(struct iio_buffer *buffer, (*p)->to + (*p)->length == out_loc) { (*p)->length += length; } else { - *p = kmalloc(sizeof(*p), GFP_KERNEL); + *p = kmalloc(sizeof(**p), GFP_KERNEL); if (*p == NULL) return -ENOMEM; (*p)->from = in_loc; |