We should just return error in invalid case. For valid but not implemented one, do nothing and return 0. Otherwise resume will abort because of the wrong return value. Signed-off-by: Feifei Xu <Feifei.Xu@xxxxxxx> --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index 5d04a1dfdfd8..5fcfd8e1a548 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c @@ -1781,13 +1781,15 @@ static int aldebaran_set_mp1_state(struct smu_context *smu, enum pp_mp1_state mp1_state) { switch (mp1_state) { + case PP_MP1_STATE_NONE: + case PP_MP1_STATE_RESET: + case PP_MP1_STATE_SHUTDOWN: + return 0; case PP_MP1_STATE_UNLOAD: return smu_cmn_set_mp1_state(smu, mp1_state); default: return -EINVAL; } - - return 0; } static const struct pptable_funcs aldebaran_ppt_funcs = { -- 2.25.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx