This is a note to let you know that I've just added the patch titled clk: imx: imx8-acm: Fix return value check in clk_imx_acm_attach_pm_domains() to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: clk-imx-imx8-acm-fix-return-value-check-in-clk_imx_a.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit caa507228139f0dbc1660ad7d7492b6f56b6028b Author: Yang Yingliang <yangyingliang@xxxxxxxxxx> Date: Sat Oct 26 19:24:52 2024 +0800 clk: imx: imx8-acm: Fix return value check in clk_imx_acm_attach_pm_domains() [ Upstream commit 81a206d736c19139d3863b79e7174f9e98b45499 ] If device_link_add() fails, it returns NULL pointer not ERR_PTR(), replace IS_ERR() with NULL pointer check, and return -EINVAL. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx> Reviewed-by: Peng Fan <peng.fan@xxxxxxx> Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxx> Link: https://lore.kernel.org/r/20241026112452.1523-1-yangyingliang@xxxxxxxxxxxxxxx Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 6c351050b82ae..c169fe53a35f8 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -294,9 +294,9 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev, DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); - if (IS_ERR(dev_pm->pd_dev_link[i])) { + if (!dev_pm->pd_dev_link[i]) { dev_pm_domain_detach(dev_pm->pd_dev[i], false); - ret = PTR_ERR(dev_pm->pd_dev_link[i]); + ret = -EINVAL; goto detach_pm; } }