]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix static checker warning
authorRex Zhu <Rex.Zhu@amd.com>
Fri, 23 Nov 2018 10:52:21 +0000 (18:52 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 26 Nov 2018 20:47:34 +0000 (15:47 -0500)
commit78a3e921fd6d70f6abbe6124f713b97417aecb28
treee89e3aebb53d7a56e96278bb3c7dc4d43c612dee
parent7b607aa68f87088d483952395e927ff4e527f5fc
drm/amdgpu: Fix static checker warning

drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c:49 amdgpu_allocate_static_csa()
error: uninitialized symbol 'ptr'.

the test if (!bo) doesn't work, as the bo is a pointer to a pointer.
if bo create failed, the *bo will be set to NULL.
so change to test *bo.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c