drm/amd/pm: fix enum type compared against 0

This less-than-zero comparison of an unsigned value is never true. type < 0U

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Jesse Zhang
2024-05-13 16:12:02 -04:00
committed by Alex Deucher
parent 269435aef4
commit 6702447161
+1 -1
View File
@@ -56,7 +56,7 @@ static const char * const __smu_message_names[] = {
static const char *smu_get_message_name(struct smu_context *smu,
enum smu_message_type type)
{
if (type < 0 || type >= SMU_MSG_MAX_COUNT)
if (type >= SMU_MSG_MAX_COUNT)
return "unknown smu message";
return __smu_message_names[type];