mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 13:29:17 -04:00
drm/amd/pm: fix enum feature compared against 0
This less-than-zero comparison of an unsigned value is never true. feature < 0U Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Tim Huang <Tim.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
6702447161
commit
1a296827fe
@@ -760,7 +760,7 @@ static const char *__smu_feature_names[] = {
|
||||
static const char *smu_get_feature_name(struct smu_context *smu,
|
||||
enum smu_feature_mask feature)
|
||||
{
|
||||
if (feature < 0 || feature >= SMU_FEATURE_COUNT)
|
||||
if (feature >= SMU_FEATURE_COUNT)
|
||||
return "unknown smu feature";
|
||||
return __smu_feature_names[feature];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user