* [PATCH][next] drm/xe/xe_late_bind_fw: Fix missing initialization of variable offset
@ 2025-09-24 10:14 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2025-09-24 10:14 UTC (permalink / raw)
To: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
David Airlie, Simona Vetter, Badal Nilawar,
Daniele Ceraolo Spurio, intel-xe, dri-devel
Cc: kernel-janitors, linux-kernel
The variable offset is not being initialized, and it is only set inside
a for-loop if entry->name is the same as manifest_entry. In the case
where it is not initialized a non-zero check on offset is potentialy
checking a bogus uninitalized value. Fix this by initializing offset
to zero.
Fixes: efa29317a553 ("drm/xe/xe_late_bind_fw: Extract and print version info")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/gpu/drm/xe/xe_late_bind_fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw.c b/drivers/gpu/drm/xe/xe_late_bind_fw.c
index 38f3feb2aecd..4f0a529caf20 100644
--- a/drivers/gpu/drm/xe/xe_late_bind_fw.c
+++ b/drivers/gpu/drm/xe/xe_late_bind_fw.c
@@ -60,7 +60,7 @@ static int parse_cpd_header(struct xe_late_bind_fw *lb_fw,
const struct gsc_manifest_header *manifest;
const struct gsc_cpd_entry *entry;
size_t min_size = sizeof(*header);
- u32 offset;
+ u32 offset = 0;
int i;
/* manifest_entry is mandatory */
--
2.51.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-24 10:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24 10:14 [PATCH][next] drm/xe/xe_late_bind_fw: Fix missing initialization of variable offset Colin Ian King
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®