From: Krzysztof Kozlowski <krzk@kernel.org>
To: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 1/6] rtc: s3c: Jump to central exit point on getting src clock error
Date: Fri, 16 Jun 2017 21:28:02 +0200 [thread overview]
Message-ID: <20170616192807.10347-1-krzk@kernel.org> (raw)
In other error paths in probe, centralized exit point was used so make
this consistent.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/rtc/rtc-s3c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index d44fb34df8fe..c5aa7a35d07f 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -510,8 +510,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
else
dev_dbg(&pdev->dev,
"probe deferred due to missing rtc src clk\n");
- clk_disable_unprepare(info->rtc_clk);
- return ret;
+ goto err_src_clk;
}
clk_prepare_enable(info->rtc_src_clk);
}
@@ -575,6 +574,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
if (info->data->needs_src_clk)
clk_disable_unprepare(info->rtc_src_clk);
+err_src_clk:
clk_disable_unprepare(info->rtc_clk);
return ret;
--
2.9.3
next reply other threads:[~2017-06-16 19:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 19:28 Krzysztof Kozlowski [this message]
2017-06-16 19:28 ` [PATCH 2/6] rtc: s3c: Minor white-space cleanups Krzysztof Kozlowski
2017-06-16 19:28 ` [PATCH 3/6] rtc: s3c: Drop unneeded cast to void pointer Krzysztof Kozlowski
2017-06-16 19:28 ` [PATCH 4/6] rtc: s3c: Do not remove const from rodata memory Krzysztof Kozlowski
2017-06-16 19:28 ` [PATCH 5/6] rtc: s3c: Handle clock prepare failures in probe Krzysztof Kozlowski
2017-06-16 19:28 ` [PATCH 6/6] rtc: s3c: Handle clock enable failures Krzysztof Kozlowski
2017-06-24 20:55 ` Alexandre Belloni
2017-06-25 7:16 ` Krzysztof Kozlowski
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=20170616192807.10347-1-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/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).