drm: Avoid connector reference imbalance on error path
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 May 2016 11:47:45 +0000 (12:47 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 May 2016 08:42:01 +0000 (10:42 +0200)
commite2d800a3ce1b16a9c25fc6ca91f26df5509ca11d
tree61cab4ecdf3ca2ebd1761ba0c8f446a99de7afb0
parent255f0e7c418ad95a4baeda017ae6182ba9b3c423
drm: Avoid connector reference imbalance on error path

Whilst looking at the fallout from using connector references for
atomic, I noticed that there is an early return buried in
drm_atomic_set_crtc_for_connector() that if hit could cause us to leak a
reference on the connector.

Fixes: d2307dea14 (drm/atomic: use connector references (v3))
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462535265-13058-1-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_atomic.c