From: Thomas Meyer Date: Thu, 19 Sep 2013 21:42:00 +0000 (+0100) Subject: iio: at91_adc: Cocci spatch "noderef" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42877236160baaa785cfdcb281a653a012c82a2b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git iio: at91_adc: Cocci spatch "noderef" sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 6da5ebb25502..79c53b8e195c 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -279,7 +279,7 @@ static int at91_adc_trigger_init(struct iio_dev *idev) int i, ret; st->trig = devm_kzalloc(&idev->dev, - st->trigger_number * sizeof(st->trig), + st->trigger_number * sizeof(*st->trig), GFP_KERNEL); if (st->trig == NULL) {