aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorTian Tao <[email protected]>2021-02-09 08:29:23 +0000
committerAlex Deucher <[email protected]>2021-02-09 20:49:33 +0000
commit802b8c83557c19e3ba1d9790e8956288c8b03dac (patch)
tree9911582c5a5665c59695049342e1eabbaff9c9fe /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amd/pm: make the error log more clear for fine grain tuning function (diff)
downloadkernel-802b8c83557c19e3ba1d9790e8956288c8b03dac.tar.gz
kernel-802b8c83557c19e3ba1d9790e8956288c8b03dac.zip
drm/amdgpu: fix unnecessary NULL check warnings
Remove NULL checks before vfree() to fix these warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:102:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 594a0108e90f..3e240b952e79 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -98,8 +98,7 @@ static int amdgpu_cs_bo_handles_chunk(struct amdgpu_cs_parser *p,
return 0;
error_free:
- if (info)
- kvfree(info);
+ kvfree(info);
return r;
}