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
@@ -140,10 +140,9 @@ static int copy_private_data(struct iwcm_id_private *cm_id_priv,
|
||||
{
|
||||
void *p;
|
||||
|
||||
p = kmalloc(event->private_data_len, GFP_ATOMIC);
|
||||
p = kmemdup(event->private_data, event->private_data_len, GFP_ATOMIC);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
memcpy(p, event->private_data, event->private_data_len);
|
||||
event->private_data = p;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user