On Mon, Jun 10, 2013 at 02:19:45PM -0300, Paulo Zanoni wrote:
> -     intel_dp_init_connector(intel_dig_port, dp_connector);
> +     /* May fail if it's an eDP connector that's disconnected. */
> +     if (!intel_dp_init_connector(intel_dig_port, dp_connector)) {
> +             intel_ddi_destroy(encoder);
> +             intel_dp_destroy(&dp_connector->base);
> +             return;
> +     }

You should not need to export intel_dp_destroy() ever. Better would be
for init to undo anything it allocates upon failure and here we just
kfree(dp_connector). In particular, intel_dp_destroy() is wrong here as
you have no idea if init returned at an appropriate juntion to make
calling that function safe.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to