From: George McCollister Date: Fri, 31 Oct 2014 15:44:00 +0000 (+0000) Subject: iio: as3935: allocate correct iio_device size X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f73cde600d410ad4b31362a9c348016e40a146ea;p=linux-beck.git iio: as3935: allocate correct iio_device size Signed-off-by: George McCollister Acked-by: Hartmut Knaack Cc: Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index 5e780ef206f3..8349cc0fdf66 100644 --- a/drivers/iio/proximity/as3935.c +++ b/drivers/iio/proximity/as3935.c @@ -330,7 +330,7 @@ static int as3935_probe(struct spi_device *spi) return -EINVAL; } - indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(st)); + indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); if (!indio_dev) return -ENOMEM;