Message ID | 20190522011504.19342-4-zhang.chunyan@linaro.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | None | expand |
Quoting Chunyan Zhang (2019-05-21 18:15:03) > 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> > --- Applied to clk-next
diff --git a/drivers/clk/sprd/sc9860-clk.c b/drivers/clk/sprd/sc9860-clk.c index 9980ab55271b..1ed45b4f2fe8 100644 --- a/drivers/clk/sprd/sc9860-clk.c +++ b/drivers/clk/sprd/sc9860-clk.c @@ -2031,7 +2031,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); }