platform/x86: hp-bioscfg: Use kmemdup() to replace kmalloc + memcpy
There are some warnings reported by coccinelle:
./drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:317:35-42:
WARNING opportunity for kmemdup
./drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:270:40-47:
WARNING opportunity for kmemdup
./drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:233:36-43:
WARNING opportunity for kmemdup
Use kmemdup rather than duplicating its implementation.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230803032027.3044851-1-lizetao1@huawei.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>