drm/imx: dw_hdmi-imx: Fix bailout in error cases of probe
authorLiu Ying <victor.liu@nxp.com>
Fri, 28 Jan 2022 09:19:44 +0000 (17:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:16 +0000 (20:59 +0200)
commit2560fe298e6e4ab99f54ed7387032d34925cf3a3
tree8f9c760e19b77a1ffc65a431899c50ddb4db723c
parent31e449302ed00c38d4068443cf0243279701ab28
drm/imx: dw_hdmi-imx: Fix bailout in error cases of probe

[ Upstream commit e8083acc3f8cc2097917018e947fd4c857f60454 ]

In dw_hdmi_imx_probe(), if error happens after dw_hdmi_probe() returns
successfully, dw_hdmi_remove() should be called where necessary as
bailout.

Fixes: c805ec7eb210 ("drm/imx: dw_hdmi-imx: move initialization into probe")
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220128091944.3831256-1-victor.liu@nxp.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/imx/dw_hdmi-imx.c