Skip to content

Commit 3114f77

Browse files
Kuppuswamy Sathyanarayananij-intel
authored andcommitted
platform/x86/intel/ifs: Initialize union ifs_status to zero
If the IFS scan test exits prematurely due to a timeout before completing a single run, the union ifs_status remains uninitialized, leading to incorrect test status reporting. To prevent this, always initialize the union ifs_status to zero. Fixes: 2b40e65 ("platform/x86/intel/ifs: Add scan test support") Suggested-by: Ilpo Järvinen <[email protected]> Reviewed-by: Jithu Joseph <[email protected]> Reviewed-by: Ashok Raj <[email protected]> Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/20240730155930.1754744-1-sathyanarayanan.kuppuswamy@linux.intel.com Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 6e73c49 commit 3114f77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/intel/ifs/runtest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ static int doscan(void *data)
221221
*/
222222
static void ifs_test_core(int cpu, struct device *dev)
223223
{
224+
union ifs_status status = {};
224225
union ifs_scan activate;
225-
union ifs_status status;
226226
unsigned long timeout;
227227
struct ifs_data *ifsd;
228228
int to_start, to_stop;

0 commit comments

Comments
 (0)