[I/Unstable/OEM-5.13] [PATCH 08/10] platform/x86: amd-pmc: Use return code on suspend

Kai-Heng Feng kai.heng.feng at canonical.com
Mon Jul 26 13:15:07 UTC 2021

From: Mario Limonciello <mario.limonciello at amd.com>

BugLink: https://bugs.launchpad.net/bugs/1934809

Right now the driver will still return success even if the OS_HINT
command failed to send to the SMU. In the rare event of a failure,
the suspend should really be aborted here so that relevant logs
can may be captured.

Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k at amd.com>
Link: https://lore.kernel.org/r/20210707141647.8871-1-mario.limonciello@amd.com
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
(cherry picked from commit a973c983375c37301645d4fea056b1f4bff77bf7 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
 drivers/platform/x86/amd-pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index d2f9a62e11660..680f94c7e075b 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -353,7 +353,7 @@ static int __maybe_unused amd_pmc_suspend(struct device *dev)
 	if (rc)
 		dev_err(pdev->dev, "suspend failed\n");
-	return 0;
+	return rc;
 static int __maybe_unused amd_pmc_resume(struct device *dev)

More information about the kernel-team mailing list