summaryrefslogtreecommitdiffstats
path: root/drivers/base/map.c
diff options
context:
space:
mode:
authorAndrei Poenaru <andreigpoenaru@gmail.com>2015-03-08 12:29:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-25 14:35:08 +0100
commit2e4fabec5e79d9fb8b75e4afda192ed3d6486f86 (patch)
tree43f2eb69aeb6fea46614e50783ae16c23837ad32 /drivers/base/map.c
parent7036cd46c8239a520abf69720de9a8538a9011d5 (diff)
downloadblackbird-op-linux-2e4fabec5e79d9fb8b75e4afda192ed3d6486f86.tar.gz
blackbird-op-linux-2e4fabec5e79d9fb8b75e4afda192ed3d6486f86.zip
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: Andrei Poenaru <andreigpoenaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/map.c')
-rw-r--r--drivers/base/map.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/map.c b/drivers/base/map.c
index e87017f36853..c1d38234d725 100644
--- 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;
OpenPOWER on IntegriCloud