All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()
@ 2020-07-24  3:54 ` Jing Xiangfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-07-24  3:54 UTC (permalink / raw)
  To: tony, linux, t-kristo
  Cc: linux-arm-kernel, linux-omap, linux-kernel, jingxiangfeng

The of_clk_get() function returns error pointers, it never returns NULL.

Fixes: 4ea3711aece4 ("ARM: OMAP2+: omap-iommu.c conversion to ti-sysc")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()
@ 2020-07-24  3:54 ` Jing Xiangfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-07-24  3:54 UTC (permalink / raw)
  To: tony, linux, t-kristo
  Cc: linux-omap, linux-kernel, linux-arm-kernel, jingxiangfeng

The of_clk_get() function returns error pointers, it never returns NULL.

Fixes: 4ea3711aece4 ("ARM: OMAP2+: omap-iommu.c conversion to ti-sysc")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()
  2020-07-24  3:54 ` Jing Xiangfeng
@ 2020-08-17 11:26   ` Tony Lindgren
  -1 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2020-08-17 11:26 UTC (permalink / raw)
  To: Jing Xiangfeng
  Cc: linux, t-kristo, linux-arm-kernel, linux-omap, linux-kernel

* Jing Xiangfeng <jingxiangfeng@huawei.com> [200724 06:51]:
> The of_clk_get() function returns error pointers, it never returns NULL.

Thanks applying into fixes.

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()
@ 2020-08-17 11:26   ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2020-08-17 11:26 UTC (permalink / raw)
  To: Jing Xiangfeng
  Cc: t-kristo, linux-omap, linux, linux-arm-kernel, linux-kernel

* Jing Xiangfeng <jingxiangfeng@huawei.com> [200724 06:51]:
> The of_clk_get() function returns error pointers, it never returns NULL.

Thanks applying into fixes.

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-17 11:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24  3:54 [PATCH] ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm() Jing Xiangfeng
2020-07-24  3:54 ` Jing Xiangfeng
2020-08-17 11:26 ` Tony Lindgren
2020-08-17 11:26   ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.