mirror of https://gitee.com/openkylin/linux.git
iio: as3935: allocate correct iio_device size
Signed-off-by: George McCollister <george.mccollister@gmail.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
25afffe16d
commit
f73cde600d
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue