From: Tiezhu Yang yangtiezhu@loongson.cn
stable inclusion from stable-v5.10.46 commit 9a17907946232d01aa2ec109da5f93b8d31dd425 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4IN CVE: CVE-2021-47234
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=...
--------------------------------
[ Upstream commit aaac9a1bd370338ce372669eb9a6059d16b929aa ]
Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix some resource leaks.
Reported-by: kernel test robot lkp@intel.com Reported-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Tiezhu Yang yangtiezhu@loongson.cn Reviewed-by: Chunfeng Yun chunfeng.yun@mediatek.com Link: https://lore.kernel.org/r/1621420659-15858-1-git-send-email-yangtiezhu@loong... Signed-off-by: Vinod Koul vkoul@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org Signed-off-by: Wenyu Huang huangwenyu5@huawei.com --- drivers/phy/mediatek/phy-mtk-tphy.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 3eb8e1bd7b78..ba34e1ed6b8e 100644 --- a/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c @@ -924,6 +924,7 @@ static int mtk_phy_init(struct phy *phy) break; default: dev_err(tphy->dev, "incompatible PHY type\n"); + clk_disable_unprepare(instance->ref_clk); return -EINVAL; }
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/8612 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/V...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/8612 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/V...