drm/nouveau/acr: Use kmemdup instead of kmalloc and memcpy
authorZou Wei <zou_wei@huawei.com>
Tue, 21 Apr 2020 12:37:31 +0000 (20:37 +0800)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:13:49 +0000 (11:13 +1000)
commit75a708918a92e30765d793b78b323efae12ef2b0
tree9905ee0fb77452a641d519b58c47c695db96b887
parentcf0f64ff4f28b4ed0cae9a3a907eda95cbe69cfe
drm/nouveau/acr: Use kmemdup instead of kmalloc and memcpy

Fixes coccicheck warning:

drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:103:23-30: WARNING opportunity for kmemdup
drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:113:22-29: WARNING opportunity for kmemdup

Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c