mirror of https://gitee.com/openkylin/linux.git
drm/amd/powerplay: fix NULL point check error
&& was used instead of || Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9ab9cf058a
commit
2dcbffad94
|
@ -199,8 +199,9 @@ void phm_apply_dal_min_voltage_request(struct pp_hwmgr *hwmgr)
|
|||
enum PP_DAL_POWERLEVEL dal_power_level = hwmgr->dal_power_level;
|
||||
uint32_t req_vddc = 0, req_volt, i;
|
||||
|
||||
if (!table && !(dal_power_level >= PP_DAL_POWERLEVEL_ULTRALOW &&
|
||||
dal_power_level <= PP_DAL_POWERLEVEL_PERFORMANCE))
|
||||
if (!table || table-count <= 0
|
||||
|| dal_power_level < PP_DAL_POWERLEVEL_ULTRALOW
|
||||
|| dal_power_level > PP_DAL_POWERLEVEL_PERFORMANCE)
|
||||
return;
|
||||
|
||||
for (i = 0; i < table->count; i++) {
|
||||
|
|
Loading…
Reference in New Issue