From: Chunyan Zhang <zhang.chunyan@linaro.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Orson Zhai <orsonzhai@gmail.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Baolin Wang <baolin.wang@linaro.org>
Subject: [PATCH v2 3/3] clk: sprd: Add check for return value of sprd_clk_regmap_init()
Date: Wed, 22 May 2019 09:15:03 +0800 [thread overview]
Message-ID: <20190522011504.19342-4-zhang.chunyan@linaro.org> (raw)
In-Reply-To: <20190522011504.19342-1-zhang.chunyan@linaro.org>
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>
---
drivers/clk/sprd/sc9860-clk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
}
--
2.17.1
next prev parent reply other threads:[~2019-05-22 1:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 1:15 [PATCH v2 0/3] Return immediately if sprd_clk_regmap_init() fails Chunyan Zhang
2019-05-22 1:15 ` [PATCH v2 1/3] clk: sprd: Switch from of_iomap() to devm_ioremap_resource() Chunyan Zhang
2019-05-22 2:07 ` Baolin Wang
2019-06-26 18:16 ` Stephen Boyd
2019-06-27 7:52 ` Chunyan Zhang
2019-05-22 1:15 ` [PATCH v2 2/3] clk: sprd: Check error only for devm_regmap_init_mmio() Chunyan Zhang
2019-05-22 2:08 ` Baolin Wang
2019-06-26 18:16 ` Stephen Boyd
2019-05-22 1:15 ` Chunyan Zhang [this message]
2019-06-26 18:16 ` [PATCH v2 3/3] clk: sprd: Add check for return value of sprd_clk_regmap_init() Stephen Boyd
2019-05-22 1:15 ` [PATCH v2 3/3] clk: sprd: Add check the " Chunyan Zhang
2019-05-22 1:26 ` [PATCH v2 0/3] Return immediately if sprd_clk_regmap_init() fails Chunyan Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190522011504.19342-4-zhang.chunyan@linaro.org \
--to=zhang.chunyan@linaro.org \
--cc=baolin.wang@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=sboyd@kernel.org \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).