Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/rockchip: Fix an error handling path rockchip_dp_probe()

Should component_add() fail, we should call analogix_dp_remove() in the
error handling path, as already done in the remove function.

Fixes: 152cce0006ab ("drm/bridge: analogix_dp: Split bind() into probe() and real bind()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/b719d9061bb97eb85145fbd3c5e63f4549f2e13e.1655572071.git.christophe.jaillet@wanadoo.fr

authored by

Christophe JAILLET and committed by
Heiko Stuebner
50743768 1449110b

+9 -1
+9 -1
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
··· 408 408 if (IS_ERR(dp->adp)) 409 409 return PTR_ERR(dp->adp); 410 410 411 - return component_add(dev, &rockchip_dp_component_ops); 411 + ret = component_add(dev, &rockchip_dp_component_ops); 412 + if (ret) 413 + goto err_dp_remove; 414 + 415 + return 0; 416 + 417 + err_dp_remove: 418 + analogix_dp_remove(dp->adp); 419 + return ret; 412 420 } 413 421 414 422 static int rockchip_dp_remove(struct platform_device *pdev)