drm/amd/amdgpu: Use kmemdup to simplify kmalloc and memcpy logic
authorChen Jiahao <chenjiahao16@huawei.com>
Wed, 16 Aug 2023 02:19:58 +0000 (10:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 18:56:47 +0000 (14:56 -0400)
commitd903af1a918fa1be628ad9c2a4412293c861cd6c
treeb48ed759203b462ef4af76396f6e43a1c710ec81
parent5465e7b87f589a6e89e73c24371a84c265232230
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c