drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 2 Sep 2023 17:34:31 +0000 (19:34 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 9 Oct 2023 19:34:29 +0000 (21:34 +0200)
commit44b968d0d0868b7a9b7a5c64464ada464ff4d532
tree85dde795028984d815a645d3ff36a1521f49f20d
parent3d59c22bbb8d03f3f14e6d0845d44c146fb48f35
drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()

cdn_dp_audio_codec_init() can fail. So add some error handling.

If component_add() fails, the previous cdn_dp_audio_codec_init() call
should be undone, as already done in the remove function.

Fixes: 88582f564692 ("drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/8494a41602fadb7439630921a9779640698f2f9f.1693676045.git.christophe.jaillet@wanadoo.fr
drivers/gpu/drm/rockchip/cdn-dp-core.c