From bfe89d724527c8b1bb1b68b0da1d94907b094094 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Sun, 29 Oct 2006 23:13:40 +0300 Subject: drivers/ieee1394/*: use kmemdup() Signed-off-by: Eric Sesterhenn Signed-off-by: Alexey Dobriyan Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/ieee1394/nodemgr.c') diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 640d677ae03..801f6061923 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -1078,10 +1078,9 @@ static struct unit_directory *nodemgr_process_unit_directory /* Logical Unit Number */ if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { if (ud->flags & UNIT_DIRECTORY_HAS_LUN) { - ud_child = kmalloc(sizeof(*ud_child), GFP_KERNEL); + ud_child = kmemdup(ud, sizeof(*ud_child), GFP_KERNEL); if (!ud_child) goto unit_directory_error; - memcpy(ud_child, ud, sizeof(*ud_child)); nodemgr_register_device(ne, ud_child, &ne->device); ud_child = NULL; -- cgit v1.2.3-70-g09d2