]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/pm: fix return value in aldebaran_set_mp1_state()
authorFeifei Xu <Feifei.Xu@amd.com>
Thu, 20 May 2021 09:46:03 +0000 (17:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 May 2021 21:59:47 +0000 (17:59 -0400)
For default cases,we should return 0. Otherwise resume will
abort because of the wrong return value.

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

index fb744f3e17d7d65dd39794c9b21d545ad430e2d9..d62cc6bb1a30531c9655be5debb147da54d76db7 100644 (file)
@@ -1856,10 +1856,8 @@ static int aldebaran_set_mp1_state(struct smu_context *smu,
        case PP_MP1_STATE_UNLOAD:
                return smu_cmn_set_mp1_state(smu, mp1_state);
        default:
-               return -EINVAL;
+               return 0;
        }
-
-       return 0;
 }
 
 static const struct pptable_funcs aldebaran_ppt_funcs = {