[PATCH 3.17 192/319] iio: as3935: allocate correct iio_device size

From: Greg Kroah-Hartman
Date: Tue Nov 11 2014 - 20:29:38 EST


3.17-stable review patch. If anyone has any objections, please let me know.

------------------

From: George McCollister <george.mccollister@xxxxxxxxx>

commit f73cde600d410ad4b31362a9c348016e40a146ea upstream.

Signed-off-by: George McCollister <george.mccollister@xxxxxxxxx>
Acked-by: Hartmut Knaack <knaack.h@xxxxxx>
Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/iio/proximity/as3935.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iio/proximity/as3935.c
+++ b/drivers/iio/proximity/as3935.c
@@ -330,7 +330,7 @@ static int as3935_probe(struct spi_devic
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;



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/