summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sprd
diff options
context:
space:
mode:
authorChunyan Zhang <zhang.chunyan@linaro.org>2019-05-22 09:15:03 +0800
committerStephen Boyd <sboyd@kernel.org>2019-06-27 15:08:29 -0700
commitc974c48deeb969c5e4250e4f06af91edd84b1f10 (patch)
treee49a4e150cfd2a858a08d842a33414718016afc6 /drivers/clk/sprd
parent78f529695182b980a5183b850fe2d87091e36874 (diff)
downloadlinux-c974c48deeb969c5e4250e4f06af91edd84b1f10.tar.bz2
clk: sprd: Add check for return value of sprd_clk_regmap_init()
sprd_clk_regmap_init() doesn't always return success, adding check for its return value should make the code more strong. Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org> Reviewed-by: Baolin Wang <baolin.wang@linaro.org> [sboyd@kernel.org: Add a missing int ret] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/sprd')
-rw-r--r--drivers/clk/sprd/sc9860-clk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/sprd/sc9860-clk.c b/drivers/clk/sprd/sc9860-clk.c
index 9980ab55271b..f76305b4bc8d 100644
--- a/drivers/clk/sprd/sc9860-clk.c
+++ b/drivers/clk/sprd/sc9860-clk.c
@@ -2023,6 +2023,7 @@ static int sc9860_clk_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
const struct sprd_clk_desc *desc;
+ int ret;
match = of_match_node(sprd_sc9860_clk_ids, pdev->dev.of_node);
if (!match) {
@@ -2031,7 +2032,9 @@ static int sc9860_clk_probe(struct platform_device *pdev)
}
desc = match->data;
- sprd_clk_regmap_init(pdev, desc);
+ ret = sprd_clk_regmap_init(pdev, desc);
+ if (ret)
+ return ret;
return sprd_clk_probe(&pdev->dev, desc->hw_clks);
}