]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iio: adc: ti_am335x_adc: allocating too much in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 May 2017 05:51:09 +0000 (08:51 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 14 May 2017 15:21:13 +0000 (16:21 +0100)
commit5ba5b437efaa7a502eec393c045d3bf90c92c4e9
tree9b2933790f45658ca416fbc35630257c71d5fb18
parentf35327f16b0cbe51d47a366aaf5dd9a3d4fac01b
iio: adc: ti_am335x_adc: allocating too much in probe

We should be allocating enough information for a tiadc_device struct
which is about 400 bytes but instead we allocate enough for a second
iio_dev struct which is over 2000 bytes.

Fixes: fea89e2dfcea ("iio: adc: ti_am335x_adc: use variable names for sizeof() operator")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/ti_am335x_adc.c