diff mbox series

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

Message ID 20210726131509.280913-9-kai.heng.feng@canonical.com
State New
Headers show
Series [I/Unstable/OEM-5.13,01/10] platform/x86: amd-pmc: Fix command completion code | expand

Commit Message

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

Patch

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)