[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240820025902.2355565-1-liyuesong@vivo.com>
Date: Tue, 20 Aug 2024 10:59:02 +0800
From: Yuesong Li <liyuesong@...o.com>
To: abelvesa@...nel.org,
mturquette@...libre.com,
shawnguo@...nel.org,
s.hauer@...gutronix.de,
sboyd@...nel.org
Cc: peng.fan@....com,
kernel@...gutronix.de,
festevam@...il.com,
shengjiu.wang@....com,
linux-clk@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Yuesong Li <liyuesong@...o.com>
Subject: [PATCH v1] clk:clk-imx8-acm:fix wrong pointer check in clk_imx_acm_attach_pm_domains()
device_link_add() returns NULL pointer not PTR_ERR() when it fails,so
replace the IS_ERR() check with NULL pointer check.
Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver")
Signed-off-by: Yuesong Li <liyuesong@...o.com>
---
drivers/clk/imx/clk-imx8-acm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c
index 1bdb480cc96c..ed8cad8d6a57 100644
--- a/drivers/clk/imx/clk-imx8-acm.c
+++ b/drivers/clk/imx/clk-imx8-acm.c
@@ -289,7 +289,7 @@ 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]);
goto detach_pm;
--
2.34.1
Powered by blists - more mailing lists