diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-02-09 16:29:23 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-02-09 15:49:33 -0500 |
commit | 802b8c83557c19e3ba1d9790e8956288c8b03dac (patch) | |
tree | 9911582c5a5665c59695049342e1eabbaff9c9fe /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | d7ef887f2f8e7ac2ce03d4f5290d96daca613e2f (diff) |
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 <tiantao6@hisilicon.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 |
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; } |