提交 29049a01 编写于 作者: L Lucas Stach 提交者: Zheng Zengkai

drm/bridge: adv7511: clean up CEC adapter when probe fails

stable inclusion
from stable-v5.10.121
commit 187ecfc3b70e2edbe39ef4cc24c5c592cb976dd2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=187ecfc3b70e2edbe39ef4cc24c5c592cb976dd2

--------------------------------

[ Upstream commit 7ed2b0da ]

When the probe routine fails we also need to clean up the
CEC adapter registered in adv7511_cec_init().

Fixes: 3b1b9750 ("drm: adv7511/33: add HDMI CEC support")
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
Reviewed-by: NRobert Foss <robert.foss@linaro.org>
Signed-off-by: NRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321104705.2804423-1-l.stach@pengutronix.deSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 0078e9f9
...@@ -1306,6 +1306,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) ...@@ -1306,6 +1306,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
return 0; return 0;
err_unregister_cec: err_unregister_cec:
cec_unregister_adapter(adv7511->cec_adap);
i2c_unregister_device(adv7511->i2c_cec); i2c_unregister_device(adv7511->i2c_cec);
if (adv7511->cec_clk) if (adv7511->cec_clk)
clk_disable_unprepare(adv7511->cec_clk); clk_disable_unprepare(adv7511->cec_clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册