mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86/intel/pmc: initialize empty PMT read result
@ 2026-06-30 10:51 Yousef Alhouseen
  2026-07-10 16:12 ` David Box
  2026-07-21 17:16 ` Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Yousef Alhouseen @ 2026-06-30 10:51 UTC (permalink / raw)
  To: Rajneesh Bhardwaj, David E . Box
  Cc: Hans de Goede, Ilpo Järvinen, platform-driver-x86,
	linux-kernel, Yousef Alhouseen

pmc_core_pmt_get_lpm_req() returns the last telemetry read status. When
firmware exposes no enabled low-power modes, the loop does not run
and the function returns an uninitialized stack value.

Initialize the status to success so an empty mode set is handled
deterministically.

Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
---
 drivers/platform/x86/intel/pmc/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index 825ba5fa0bcb..9f77c0716e59 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -1583,7 +1583,7 @@ int pmc_core_pmt_get_lpm_req(struct pmc_dev *pmcdev, struct pmc *pmc, struct tel
 {
 	const u8 *lpm_indices;
 	int num_maps, mode_offset = 0;
-	int ret, lpm_size;
+	int ret = 0, lpm_size;
 	u8 mode;
 
 	lpm_indices = pmc->map->lpm_reg_index;
-- 
2.54.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-21 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30 10:51 [PATCH] platform/x86/intel/pmc: initialize empty PMT read result Yousef Alhouseen
2026-07-10 16:12 ` David Box
2026-07-21 17:16 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®