Message ID | 1392321093-1886-1-git-send-email-przanoni@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Feb 13, 2014 at 8:51 PM, Paulo Zanoni <przanoni@gmail.com> wrote: > encoder = to_intel_encoder(connector->base.encoder); > + if (!encoder) > + continue; to_intel_connector can change a NULL pointer to something slightly different if the base structure isn't the very first thing. Hence you must do the check before the casting. I've fixed that up while applying, thanks for spotting and fixing this. -Daniel
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index b737583..cb3d0f4 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1938,6 +1938,8 @@ static int i915_sink_crc(struct seq_file *m, void *data) continue; encoder = to_intel_encoder(connector->base.encoder); + if (!encoder) + continue; if (encoder->type != INTEL_OUTPUT_EDP) continue;