Skip to content

Commit 1a7460a

Browse files
ColinIanKinglucasdemarchi
authored andcommitted
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: 292b1a8 ("drm/xe: Stop ignoring errors from xe_heci_gsc_init()") Signed-off-by: Colin Ian King <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent eef3ede commit 1a7460a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_heci_gsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static int heci_gsc_add_device(struct xe_device *xe, const struct heci_gsc_def *
173173
int xe_heci_gsc_init(struct xe_device *xe)
174174
{
175175
struct xe_heci_gsc *heci_gsc = &xe->heci_gsc;
176-
const struct heci_gsc_def *def;
176+
const struct heci_gsc_def *def = NULL;
177177
int ret;
178178

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

0 commit comments

Comments
 (0)