]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge/analogix/anx78xx: Cleanup on error in anx78xx_bridge_attach()
authorLyude Paul <lyude@redhat.com>
Fri, 19 Feb 2021 21:53:05 +0000 (16:53 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 23 Mar 2021 18:18:45 +0000 (14:18 -0400)
commitb6221fad46951d129d07f798cccded827683f25a
treee49a03c0a2178ab12ddde7cc1133eaa7de543472
parent006b9419099c3b9ed91a88e4a4f2d6fa626c3cb6
drm/bridge/analogix/anx78xx: Cleanup on error in anx78xx_bridge_attach()

Just another issue I noticed while correcting usages of
drm_dp_aux_init()/drm_dp_aux_register() around the tree. If any of the
steps in anx78xx_bridge_attach() fail, we end up leaking resources. So,
let's fix that (and fix leaking a DP AUX adapter in the process) by
unrolling on errors.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-10-lyude@redhat.com
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c