[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200713024527.17892-1-vulab@iscas.ac.cn>
Date: Mon, 13 Jul 2020 02:45:27 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: tony@...mide.com, linux@...linux.org.uk,
linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Xu Wang <vulab@...as.ac.cn>
Subject: [PATCH] arm: omap-iommu: fix return value check in _get_pwrdm()
In case of error, function of_clk_get() returns ERR_PTR()
and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().
Signed-off-by: Xu Wang <vulab@...as.ac.cn>
---
arch/arm/mach-omap2/omap-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index 54aff33e55e6..bfa5e1b8dba7 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -74,7 +74,7 @@ static struct powerdomain *_get_pwrdm(struct device *dev)
return pwrdm;
clk = of_clk_get(dev->of_node->parent, 0);
- if (!clk) {
+ if (IS_ERR(clk)) {
dev_err(dev, "no fck found\n");
return NULL;
}
--
2.17.1
Powered by blists - more mailing lists