OSDN Git Service

iio: as3935: allocate correct iio_device size
authorGeorge McCollister <george.mccollister@gmail.com>
Fri, 31 Oct 2014 15:44:00 +0000 (15:44 +0000)
committerJonathan Cameron <jic23@kernel.org>
Wed, 5 Nov 2014 18:33:46 +0000 (18:33 +0000)
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>
drivers/iio/proximity/as3935.c

index 5e780ef..8349cc0 100644 (file)
@@ -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;