Message ID | 20200724035430.96287-1-jingxiangfeng@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm() | expand |
* 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
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; }
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(-)