projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
438f13a
)
IIO: adc: at91_adc.c Prefer kmalloc_array over kmalloc with multiply
author
Nizam Haider
<nizamhaider786@gmail.com>
Mon, 16 Nov 2015 00:05:57 +0000
(
05:35
+0530)
committer
Jonathan Cameron
<jic23@kernel.org>
Sun, 22 Nov 2015 12:06:19 +0000
(12:06 +0000)
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>
drivers/iio/adc/at91_adc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/adc/at91_adc.c
b/drivers/iio/adc/at91_adc.c
index 7b40925dd4ff297e56fa0a3541980e9964d14092..f284cd6a93d6484fa942085b58e25f1b4de84fa5 100644
(file)
--- a/
drivers/iio/adc/at91_adc.c
+++ b/
drivers/iio/adc/at91_adc.c
@@
-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;