Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/xe_late_bind_fw: Various uninitialized variable fixes
@ 2025-09-22 16:17 Jonathan Cavitt
  2025-09-22 17:32 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jonathan Cavitt @ 2025-09-22 16:17 UTC (permalink / raw)
  To: intel-xe; +Cc: jonathan.cavitt, saurabhg.gupta, alex.zuo

There are a few variables in xe_late_bind_fw that can theoretically
be used while uninitialized.  Initialize them.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
 drivers/gpu/drm/xe/xe_late_bind_fw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw.c b/drivers/gpu/drm/xe/xe_late_bind_fw.c
index 38f3feb2aecd..2a57f7d28e9a 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 */
@@ -116,7 +116,7 @@ static int parse_lb_layout(struct xe_late_bind_fw *lb_fw,
 	const struct csc_fpt_header *header = data;
 	const struct csc_fpt_entry *entry;
 	size_t min_size = sizeof(*header);
-	u32 offset;
+	u32 offset = 0;
 	int i;
 
 	/* fpt_entry is mandatory */
@@ -188,7 +188,7 @@ static int xe_late_bind_fw_num_fans(struct xe_late_bind *late_bind)
 {
 	struct xe_device *xe = late_bind_to_xe(late_bind);
 	struct xe_tile *root_tile = xe_device_get_root_tile(xe);
-	u32 uval;
+	u32 uval = 0;
 
 	if (!xe_pcode_read(root_tile,
 			   PCODE_MBOX(FAN_SPEED_CONTROL, FSC_READ_NUM_FANS, 0), &uval, NULL))
-- 
2.43.0


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

end of thread, other threads:[~2025-09-29 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 16:17 [PATCH] drm/xe/xe_late_bind_fw: Various uninitialized variable fixes Jonathan Cavitt
2025-09-22 17:32 ` ✓ CI.KUnit: success for " Patchwork
2025-09-22 18:07 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-22 22:08 ` ✓ Xe.CI.Full: " Patchwork
2025-09-29 15:43 ` [PATCH] " Cavitt, Jonathan

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