drm/amd/amdgpu: Use kmemdup to simplify kmalloc and memcpy logic

Using kmemdup() helper function rather than implementing it again
with kmalloc() + memcpy(), which improves the code readability.

Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Chen Jiahao 2023-08-16 10:19:58 +08:00 • committed by Alex Deucher
commit d903af1a91