drm/i915: Avoid null dereference if mst_port is unset.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 10 Aug 2017 14:50:43 +0000 (07:50 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 10 Aug 2017 20:59:26 +0000 (13:59 -0700)
commit06bfe5b0d892f8120172380694eb66eeb23baf90
treebe99d43eaf087afa2d12fd901aecf5faa0944aa4
parent28b6cb08206fe19585f57c3f5c683aff9b2e2fdf
drm/i915: Avoid null dereference if mst_port is unset.

I'm not sure if this is really the case and I don't believe
this is the real fix for the bug mentioned here, but since
I don't see a reliable path when mst_port is set and when
mode_valid is requested I believe it is worth to have this
protection here.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102022
Cc: Elizabeth <elizabethx.de.la.torre.mena@intel.com>
Cc: Stefan Assmann <sassmann@redhat.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170810145043.24047-1-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/intel_dp_mst.c