projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7036cd4
)
drivers: base: map: Use kmalloc_array instead of kmalloc
author
Andrei Poenaru
<andreigpoenaru@gmail.com>
Sun, 8 Mar 2015 10:29:02 +0000
(12:29 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 25 Mar 2015 13:35:08 +0000
(14:35 +0100)
Reported by checkpatch.pl
While at it, removed blank line between function call and error
checking.
Signed-off-by: Andrei Poenaru <andreigpoenaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/map.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/map.c
b/drivers/base/map.c
index e87017f3685356854629a439ae4ec5900a7129e2..c1d38234d725c858f2b986f4e4d5e37a75449e5c 100644
(file)
--- a/
drivers/base/map.c
+++ b/
drivers/base/map.c
@@
-41,8
+41,7
@@
int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range,
if (n > 255)
n = 255;
- p = kmalloc(sizeof(struct probe) * n, GFP_KERNEL);
-
+ p = kmalloc_array(n, sizeof(struct probe), GFP_KERNEL);
if (p == NULL)
return -ENOMEM;