IIO: adc: at91_adc.c Prefer kmalloc_array over kmalloc with multiply

So this patch swaps that use out for kmalloc_array instead.

Signed-off-by Nizam Haider <nijamh@cdac.in>

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Nizam Haider 2015-11-16 05:35:57 +05:30 committed by Jonathan Cameron
parent 438f13a283
commit 3fba9b5ff8

View File

@ -742,7 +742,7 @@ static int at91_adc_of_get_resolution(struct at91_adc_state *st,
return count;
}
resolutions = kmalloc(count * sizeof(*resolutions), GFP_KERNEL);
resolutions = kmalloc_array(count, sizeof(*resolutions), GFP_KERNEL);
if (!resolutions)
return -ENOMEM;