summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sprd
diff options
context:
space:
mode:
authorChunyan Zhang <zhang.chunyan@linaro.org>2019-05-22 03:15:02 +0200
committerStephen Boyd <sboyd@kernel.org>2019-06-26 20:15:08 +0200
commit78f529695182b980a5183b850fe2d87091e36874 (patch)
treee48d66fee63f86670ad41f8a0f8cc2ca3b1a4492 /drivers/clk/sprd
parentclk: sprd: Switch from of_iomap() to devm_ioremap_resource() (diff)
downloadlinux-78f529695182b980a5183b850fe2d87091e36874.tar.xz
linux-78f529695182b980a5183b850fe2d87091e36874.zip
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>
Diffstat (limited to 'drivers/clk/sprd')
-rw-r--r--drivers/clk/sprd/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sprd/common.c b/drivers/clk/sprd/common.c
index 9ce690999eaa..a5bdca1de5d0 100644
--- a/drivers/clk/sprd/common.c
+++ b/drivers/clk/sprd/common.c
@@ -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);
}