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>
This commit is contained in:
committed by
Roland Dreier
parent
a1a733f65b
commit
bed8bdfddd
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user