Commit 78f52969 authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Stephen Boyd

clk: sprd: Check error only for devm_regmap_init_mmio()

The function devm_regmap_init_mmio() wouldn't return NULL pointer for
now, so only need to ensure the return value is not an error code.
Signed-off-by: default avatarChunyan Zhang <zhang.chunyan@linaro.org>
Reviewed-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 69b39d25
......@@ -58,7 +58,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
regmap = devm_regmap_init_mmio(&pdev->dev, base,
&sprdclk_regmap_config);
if (IS_ERR_OR_NULL(regmap)) {
if (IS_ERR(regmap)) {
pr_err("failed to init regmap\n");
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