summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-11-18 13:38:42 +1000
committerDave Airlie <airlied@redhat.com>2024-11-18 13:38:46 +1000
commita163b895077861598be48c1cf7f4a88413c28b22 (patch)
treef615a90d731f8791c5341b73c770ae95f241fbd3 /drivers
parentade5add00da20de40f63d097345bddea24d924f4 (diff)
parent6d9f9115c091c88cacf78734d8ea34c8609e8680 (diff)
Merge tag 'drm-xe-next-fixes-2024-11-15' of https://gitlab.freedesktop.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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/xe/xe_guc_capture.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_guc_capture.c
index 8b6cb786a2aa..cc72446a5de1 100644
--- a/drivers/gpu/drm/xe/xe_guc_capture.c
+++ b/drivers/gpu/drm/xe/xe_guc_capture.c
@@ -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)
@@ -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 {