Skip to content

Commit

Permalink
Merge tag 'drm-xe-next-fixes-2024-11-15' of https://gitlab.freedeskto…
Browse files Browse the repository at this point in the history
…p.org/drm/xe/kernel into drm-next

Driver Changes:
- Fix a NULL pointer deref (Everest K.C.)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZzcsMT_FEqBE0cAW@fedora
  • Loading branch information
Dave Airlie committed Nov 18, 2024
2 parents ade5add + 6d9f911 commit a163b89
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/xe/xe_guc_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ read_reg_to_node(struct xe_hw_engine *hwe, const struct __guc_mmio_reg_descr_gro
{
int i;

if (!list || list->num_regs == 0)
if (!list || !list->list || list->num_regs == 0)
return;

if (!regs)
Expand All @@ -1541,9 +1541,6 @@ read_reg_to_node(struct xe_hw_engine *hwe, const struct __guc_mmio_reg_descr_gro
struct __guc_mmio_reg_descr desc = list->list[i];
u32 value;

if (!list->list)
return;

if (list->type == GUC_STATE_CAPTURE_TYPE_ENGINE_INSTANCE) {
value = xe_hw_engine_mmio_read32(hwe, desc.reg);
} else {
Expand Down

0 comments on commit a163b89

Please sign in to comment.