Commit 2e4fabec authored by Andrei Poenaru's avatar Andrei Poenaru Committed by Greg Kroah-Hartman

drivers: base: map: Use kmalloc_array instead of kmalloc

Reported by checkpatch.pl

While at it, removed blank line between function call and error
checking.
Signed-off-by: default avatarAndrei Poenaru <andreigpoenaru@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7036cd46
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment