diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-23 22:17:21 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-29 15:33:06 -0800 |
commit | bed8bdfddd851657cf9e5fd16bb44abb02ae7f42 (patch) | |
tree | ac021f613071dc4a274d071ea900709cd4e17374 /drivers/infiniband/core/cm.c | |
parent | a1a733f65b091fdad3d0783e648c92b491933ab6 (diff) |
IB: kmemdup() cleanup
Replace open coded kmemdup() to save some screen space, and allow
inlining/not inlining to be triggered by gcc.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/cm.c')
-rw-r--r-- | drivers/infiniband/core/cm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 25b1018a476..82bc83bacea 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -240,11 +240,10 @@ static void * cm_copy_private_data(const void *private_data, if (!private_data || !private_data_len) return NULL; - data = kmalloc(private_data_len, GFP_KERNEL); + data = kmemdup(private_data, private_data_len, GFP_KERNEL); if (!data) return ERR_PTR(-ENOMEM); - memcpy(data, private_data, private_data_len); return data; } |