Skip to content

Commit

Permalink
ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()
Browse files Browse the repository at this point in the history
[ Upstream commit a58cfdb ]

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

Fixes: 4ea3711 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
hiss2018 authored and gregkh committed Sep 17, 2020
1 parent f82f36b commit aab25ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/omap-iommu.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit aab25ff

Please sign in to comment.