]> git.baikalelectronics.ru Git - kernel.git/commit
net: Use kmemdup instead of kmalloc and memcpy
authorShyam Saini <mayhs11saini@gmail.com>
Fri, 23 Dec 2016 19:14:58 +0000 (00:44 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Dec 2016 16:37:14 +0000 (11:37 -0500)
commit8fea7889aadbbec7f07fd36a16ad8092c621d1a2
tree2e8ccd20864425053597d8c8448151463f7f7f70
parent41b9d379a9e27a122d876f942c6624aa82b08ff9
net: Use kmemdup instead of kmalloc and memcpy

when some other buffer is immediately copied into allocated region.
Replace calls to kmalloc followed by a memcpy with a direct
call to kmemdup.

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c