]> git.ipfire.org Git - thirdparty/u-boot.git/commit
drivers/core: use memdup() instead of malloc()+memcpy()
authorRasmus Villemoes <ravi@prevas.dk>
Tue, 21 Apr 2026 07:54:38 +0000 (09:54 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 12 May 2026 21:38:00 +0000 (15:38 -0600)
commit4ef201e607ebed2432ee929446e3fb9b57c53a54
treee619ebada0b2c2595fc52f4a88acc94b3a13b696
parent11168813bf9c088e1fce8a96f4b493ee815c966b
drivers/core: use memdup() instead of malloc()+memcpy()

Use memdup() instead of open-coding it.

In the dm_setup_inst() case, there was never any reason to use
calloc(), as the whole allocation is definitely initialized via the
immediately following memcpy().

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
drivers/core/acpi.c
drivers/core/ofnode.c
drivers/core/root.c