]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/sdvo: kfree the intel_sdvo_connector, not drm_connector, on destroy
authorJani Nikula <jani.nikula@intel.com>
Mon, 12 Nov 2012 16:31:36 +0000 (18:31 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 Nov 2012 13:10:19 +0000 (14:10 +0100)
commit9a30628bc523a49e9173a3c3dffb843f12d06e38
treeb7a932e3a40e294650107d94df0c6116895396c4
parent890fd5641d06818078240b17a042be56ce6064ba
drm/i915/sdvo: kfree the intel_sdvo_connector, not drm_connector, on destroy

Since the base fields in both struct intel_connector and struct
intel_sdvo_connector are at the beginning of the enclosing struct, the
pointers are essentially the same, but there is no requirement or guarantee
that this is always the case. Kfree the enclosing intel_sdvo_connector
pointer that was originally allocated, not the enclosed drm_connector, in
case someone ever rearranges the structs.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_sdvo.c