Commit 8e94de44 authored by Baolin Wang's avatar Baolin Wang Committed by Greg Kroah-Hartman

clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle()

commit 9629dbda upstream.

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: d41f59fd ("clk: sprd: Add common infrastructure")
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Link: https://lkml.kernel.org/r/1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eaac3dc7
......@@ -45,7 +45,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
if (of_find_property(node, "sprd,syscon", NULL)) {
regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon");
if (IS_ERR_OR_NULL(regmap)) {
if (IS_ERR(regmap)) {
pr_err("%s: failed to get syscon regmap\n", __func__);
return PTR_ERR(regmap);
}
......
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