1
0
Fork 0

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: Chunyan Zhang <zhang.chunyan@linaro.org>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
alistair/sunxi64-5.4-dsi
Chunyan Zhang 2019-05-22 09:15:02 +08:00 committed by Stephen Boyd
parent 69b39d2503
commit 78f5296951
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}