Commit 6f8e98b9 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Alex Deucher

drm/amd/pm: Remove many unnecessary NULL values

Ther are many pointers assigned first, which need not to be initialized, so
remove the NULL assignment.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7ffcbd1a
...@@ -1237,7 +1237,7 @@ static int get_vce_clock_voltage_limit_table(struct pp_hwmgr *hwmgr, ...@@ -1237,7 +1237,7 @@ static int get_vce_clock_voltage_limit_table(struct pp_hwmgr *hwmgr,
const VCEClockInfoArray *array) const VCEClockInfoArray *array)
{ {
unsigned long i; unsigned long i;
struct phm_vce_clock_voltage_dependency_table *vce_table = NULL; struct phm_vce_clock_voltage_dependency_table *vce_table;
vce_table = kzalloc(struct_size(vce_table, entries, table->numEntries), vce_table = kzalloc(struct_size(vce_table, entries, table->numEntries),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -2732,7 +2732,7 @@ static bool ci_is_dpm_running(struct pp_hwmgr *hwmgr) ...@@ -2732,7 +2732,7 @@ static bool ci_is_dpm_running(struct pp_hwmgr *hwmgr)
static int ci_smu_init(struct pp_hwmgr *hwmgr) static int ci_smu_init(struct pp_hwmgr *hwmgr)
{ {
struct ci_smumgr *ci_priv = NULL; struct ci_smumgr *ci_priv;
ci_priv = kzalloc(sizeof(struct ci_smumgr), GFP_KERNEL); ci_priv = kzalloc(sizeof(struct ci_smumgr), GFP_KERNEL);
......
...@@ -332,7 +332,7 @@ static bool fiji_is_hw_avfs_present(struct pp_hwmgr *hwmgr) ...@@ -332,7 +332,7 @@ static bool fiji_is_hw_avfs_present(struct pp_hwmgr *hwmgr)
static int fiji_smu_init(struct pp_hwmgr *hwmgr) static int fiji_smu_init(struct pp_hwmgr *hwmgr)
{ {
struct fiji_smumgr *fiji_priv = NULL; struct fiji_smumgr *fiji_priv;
fiji_priv = kzalloc(sizeof(struct fiji_smumgr), GFP_KERNEL); fiji_priv = kzalloc(sizeof(struct fiji_smumgr), GFP_KERNEL);
......
...@@ -259,7 +259,7 @@ static int iceland_start_smu(struct pp_hwmgr *hwmgr) ...@@ -259,7 +259,7 @@ static int iceland_start_smu(struct pp_hwmgr *hwmgr)
static int iceland_smu_init(struct pp_hwmgr *hwmgr) static int iceland_smu_init(struct pp_hwmgr *hwmgr)
{ {
struct iceland_smumgr *iceland_priv = NULL; struct iceland_smumgr *iceland_priv;
iceland_priv = kzalloc(sizeof(struct iceland_smumgr), GFP_KERNEL); iceland_priv = kzalloc(sizeof(struct iceland_smumgr), GFP_KERNEL);
......
...@@ -226,7 +226,7 @@ static int tonga_start_smu(struct pp_hwmgr *hwmgr) ...@@ -226,7 +226,7 @@ static int tonga_start_smu(struct pp_hwmgr *hwmgr)
static int tonga_smu_init(struct pp_hwmgr *hwmgr) static int tonga_smu_init(struct pp_hwmgr *hwmgr)
{ {
struct tonga_smumgr *tonga_priv = NULL; struct tonga_smumgr *tonga_priv;
tonga_priv = kzalloc(sizeof(struct tonga_smumgr), GFP_KERNEL); tonga_priv = kzalloc(sizeof(struct tonga_smumgr), GFP_KERNEL);
if (tonga_priv == NULL) if (tonga_priv == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment