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: 4ea3711aec ("ARM: OMAP2+: omap-iommu.c conversion to ti-sysc")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Jing Xiangfeng 2020-07-24 11:54:30 +08:00 committed by Tony Lindgren
parent 9123e3a74e
commit a58cfdba20

View File

@ -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;
}