platform/x86/intel/pmc: initialize empty PMT read result

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>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Link: https://patch.msgid.link/20260630105101.54016-1-alhouseenyousef@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Yousef Alhouseen 2026-06-30 12:51:01 +02:00 committed by Ilpo Järvinen
parent e6137bbef0
commit 408b87a481
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -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;