Commit 1f1c60d5 authored by Xinyun Liu's avatar Xinyun Liu Committed by Zhenyu Wang

drm/i915/gvt: Avoid dereference a potential null pointer

Add sanity check for up_irq_info.
Signed-off-by: default avatarXinyun Liu <xinyun.liu@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent 0766e2ef
......@@ -350,7 +350,8 @@ static void update_upstream_irq(struct intel_vgpu *vgpu,
clear_bits |= (1 << bit);
}
WARN_ON(!up_irq_info);
if (WARN_ON(!up_irq_info))
return;
if (up_irq_info->group == INTEL_GVT_IRQ_INFO_MASTER) {
u32 isr = i915_mmio_reg_offset(up_irq_info->reg_base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment