diff options
| author | Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> | 2024-07-30 15:59:30 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-14 13:52:43 +0200 |
| commit | 5a6a894b3a1b11d7ca8aa314023e740611fd1b96 (patch) | |
| tree | 97c5bd482ef1005d34f60217c705bb3f3de94c32 /drivers | |
| parent | 84fec10ef552858507407e48278deb511e4b666f (diff) | |
| download | linux-5a6a894b3a1b11d7ca8aa314023e740611fd1b96.tar.gz linux-5a6a894b3a1b11d7ca8aa314023e740611fd1b96.tar.bz2 linux-5a6a894b3a1b11d7ca8aa314023e740611fd1b96.zip | |
platform/x86/intel/ifs: Initialize union ifs_status to zero
[ Upstream commit 3114f77e9453daa292ec0906f313a715c69b5943 ]
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: 2b40e654b73a ("platform/x86/intel/ifs: Add scan test support")
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jithu Joseph <jithu.joseph@intel.com>
Reviewed-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lore.kernel.org/r/20240730155930.1754744-1-sathyanarayanan.kuppuswamy@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/platform/x86/intel/ifs/runtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/ifs/runtest.c b/drivers/platform/x86/intel/ifs/runtest.c index d6bc2f0b61a3..aeb6a3b7a8fd 100644 --- a/drivers/platform/x86/intel/ifs/runtest.c +++ b/drivers/platform/x86/intel/ifs/runtest.c @@ -165,8 +165,8 @@ static int doscan(void *data) */ static void ifs_test_core(int cpu, struct device *dev) { + union ifs_status status = {}; union ifs_scan activate; - union ifs_status status; unsigned long timeout; struct ifs_data *ifsd; int to_start, to_stop; |
