[Intel-gfx] [PATCH] drm/i915: don't reference null pointer at i915_sink_crc

Daniel Vetter daniel at ffwll.ch
Thu Feb 13 22:34:16 CET 2014


On Thu, Feb 13, 2014 at 8:51 PM, Paulo Zanoni <przanoni at 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
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list