drm/i915: don't check encoder at DP connector destroy()
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 12 Jun 2013 20:27:23 +0000 (17:27 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 28 Jun 2013 12:14:16 +0000 (14:14 +0200)
commitacd8db100ed5220fe8043f91cdc20155325542a9
treeb08409e277f27a9f25fa808254ced1a5beeff55c
parentd482e5fa299c2cfbb4700143dd766273730e2357
drm/i915: don't check encoder at DP connector destroy()

By the time we call intel_dp_destroy (which destroys the connector)
the encoder may have been destroyed already, so if we use it we may be
reading some free memory. That happens in drm_mode_config_cleanup()
and also inside intel_dp_init_connector() when we detect a ghost eDP.

I also hope this may solve some random memory bugs.

Reported by kmemcheck.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Zoltan Nyul <zoltan.nyul@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c