diff options
author | Harish Chegondi <harish.chegondi@intel.com> | 2021-12-17 17:02:55 +0100 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2022-01-07 22:33:51 +0100 |
commit | 814d5c51f8966895bb20b51c886bd3961f76f3f4 (patch) | |
tree | ea822c5ca9ffc0a03be6ee3125179623bbf8b1cb /drivers/gpu/drm/i915 | |
parent | drm/i915: stop including i915_irq.h from i915_drv.h (diff) | |
download | linux-814d5c51f8966895bb20b51c886bd3961f76f3f4.tar.xz linux-814d5c51f8966895bb20b51c886bd3961f76f3f4.zip |
drm/i915: Fix possible NULL pointer dereferences in i9xx_update_wm()
Check return pointer from intel_crtc_for_plane() before dereferencing
it, as it can be NULL.
v2: Moved the NULL check into intel_crtc_active().
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Caz Yokoyama <caz.yokoyama@intel.com>
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211217160255.1300348-1-harish.chegondi@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 3714f96f17b3..161d064e0768 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -877,7 +877,7 @@ static bool intel_crtc_active(struct intel_crtc *crtc) * crtc->state->active once we have proper CRTC states wired up * for atomic. */ - return crtc->active && crtc->base.primary->state->fb && + return crtc && crtc->active && crtc->base.primary->state->fb && crtc->config->hw.adjusted_mode.crtc_clock; } |