aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEdward O'Callaghan <funfunctor@folklore1984.net>2016-07-11 20:17:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-29 14:36:49 -0400
commita698e41782dfa223b1f929152d24821af3fbea56 (patch)
tree148e1ac4abaa13a6407c9d6f5d6e4fee681687d5 /drivers/gpu
parent004e29ccf034ea1fb08e77b76106891bb88fae6f (diff)
drivers/amdgpu: Remove redundant NULL check before kfree()
Found-by: Coccinelle Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c3
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index ee95e950a19b..4cd857ff73ff 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -1065,8 +1065,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
1065 } 1065 }
1066 1066
1067error: 1067error:
1068 if (obj != NULL) 1068 kfree(obj);
1069 kfree(obj);
1070 kfree((void *)input.pointer); 1069 kfree((void *)input.pointer);
1071 return result; 1070 return result;
1072} 1071}
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
index 7a705cee0cc2..bbdedec150f9 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
@@ -77,8 +77,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
77 77
78 result = phm_run_table(hwmgr, rt_table, input, output, temp_storage); 78 result = phm_run_table(hwmgr, rt_table, input, output, temp_storage);
79 79
80 if (NULL != temp_storage) 80 kfree(temp_storage);
81 kfree(temp_storage);
82 81
83 return result; 82 return result;
84} 83}