]> git.ipfire.org Git - thirdparty/linux.git/commit
mptcp: pm: in-kernel: use kmemdup helper
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 13 Mar 2025 10:20:51 +0000 (11:20 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 20 Mar 2025 09:14:48 +0000 (10:14 +0100)
commitfa123489e7ef5c5c26d530bc4d7411bca7253c69
tree862c44b68d628005e1866f10bb9d875cba04fe56
parentb97d6b6820279c84d67d5e870d87ce45e8e348a5
mptcp: pm: in-kernel: use kmemdup helper

Instead of using kmalloc() or kzalloc() to allocate an entry and
then immediately duplicate another entry to the newly allocated
one, kmemdup() helper can be used to simplify the code.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250313-net-next-mptcp-pm-ops-intro-v1-2-f4e4a88efc50@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mptcp/pm_kernel.c