Commit 1a7460a1 authored by Colin Ian King's avatar Colin Ian King Committed by Lucas De Marchi
Browse files

drm/xe: Fix uninitialized pointer def



In the case where a set of checks on xe->info.platform don't assign
a value to pointer def the pointer remains uninitialized and hence
can fail the following !def check. Fix this be ensuring pointer
def is initialized to NULL.

Fixes: 292b1a8a ("drm/xe: Stop ignoring errors from xe_heci_gsc_init()")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250226160524.566074-1-colin.i.king@gmail.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent eef3ede5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static int heci_gsc_add_device(struct xe_device *xe, const struct heci_gsc_def *
int xe_heci_gsc_init(struct xe_device *xe)
{
	struct xe_heci_gsc *heci_gsc = &xe->heci_gsc;
	const struct heci_gsc_def *def;
	const struct heci_gsc_def *def = NULL;
	int ret;

	if (!xe->info.has_heci_gscfi && !xe->info.has_heci_cscfi)