Commit a58cfdba authored by Jing Xiangfeng's avatar Jing Xiangfeng Committed by Tony Lindgren

ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()

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

Fixes: 4ea3711a ("ARM: OMAP2+: omap-iommu.c conversion to ti-sysc")
Signed-off-by: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 9123e3a7
...@@ -74,7 +74,7 @@ static struct powerdomain *_get_pwrdm(struct device *dev) ...@@ -74,7 +74,7 @@ static struct powerdomain *_get_pwrdm(struct device *dev)
return pwrdm; return pwrdm;
clk = of_clk_get(dev->of_node->parent, 0); clk = of_clk_get(dev->of_node->parent, 0);
if (!clk) { if (IS_ERR(clk)) {
dev_err(dev, "no fck found\n"); dev_err(dev, "no fck found\n");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment