Skip to content

Commit 9629dbd

Browse files
wangbaolin719bebarino
authored andcommitted
clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle()
The syscon_regmap_lookup_by_phandle() will never return NULL, thus use IS_ERR() to validate the return value instead of IS_ERR_OR_NULL(). Fixes: d41f59f ("clk: sprd: Add common infrastructure") Signed-off-by: Baolin Wang <[email protected]> Link: https://lkml.kernel.org/r/1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org Signed-off-by: Stephen Boyd <[email protected]>
1 parent 54ecb8f commit 9629dbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/sprd/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
4646

4747
if (of_find_property(node, "sprd,syscon", NULL)) {
4848
regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon");
49-
if (IS_ERR_OR_NULL(regmap)) {
49+
if (IS_ERR(regmap)) {
5050
pr_err("%s: failed to get syscon regmap\n", __func__);
5151
return PTR_ERR(regmap);
5252
}

0 commit comments

Comments
 (0)