linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Loic Pallardy <loic.pallardy@st.com>
To: <bjorn.andersson@linaro.org>, <ohad@wizery.com>, <lee.jones@linaro.org>
Cc: <loic.pallardy@st.com>, <linux-remoteproc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel@stlinux.com>,
	<patrice.chotard@st.com>, <hugues.fruchet@st.com>,
	<peter.griffin@linaro.org>
Subject: [PATCH v3 1/4] remoteproc: st: correct probe error management
Date: Tue, 31 Jan 2017 13:35:53 +0100	[thread overview]
Message-ID: <1485866156-6364-2-git-send-email-loic.pallardy@st.com> (raw)
In-Reply-To: <1485866156-6364-1-git-send-email-loic.pallardy@st.com>

Associated clock is prepared in st_rproc_parse_dt function.
it should be unprepared in case of error during probing.

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
---
Changes from V2:
New patch fixing st_rproc_probe error management

 drivers/remoteproc/st_remoteproc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c
index da4e152..bdfab49 100644
--- a/drivers/remoteproc/st_remoteproc.c
+++ b/drivers/remoteproc/st_remoteproc.c
@@ -247,7 +247,7 @@ static int st_rproc_probe(struct platform_device *pdev)
 	enabled = st_rproc_state(pdev);
 	if (enabled < 0) {
 		ret = enabled;
-		goto free_rproc;
+		goto free_clk;
 	}
 
 	if (enabled) {
@@ -259,10 +259,12 @@ static int st_rproc_probe(struct platform_device *pdev)
 
 	ret = rproc_add(rproc);
 	if (ret)
-		goto free_rproc;
+		goto free_clk;
 
 	return 0;
 
+free_clk:
+	clk_unprepare(ddata->clk);
 free_rproc:
 	rproc_free(rproc);
 	return ret;
-- 
1.9.1

  reply	other threads:[~2017-01-31 12:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 12:35 [PATCH v3 0/4] remoteproc: st: add virtio_rpmsg support Loic Pallardy
2017-01-31 12:35 ` Loic Pallardy [this message]
2017-02-06 21:19   ` [PATCH v3 1/4] remoteproc: st: correct probe error management Bjorn Andersson
2017-02-07 22:20     ` Loic PALLARDY
2017-01-31 12:35 ` [PATCH v3 2/4] remoteproc: st: add virtio communication support Loic Pallardy
2017-01-31 12:35 ` [PATCH v3 3/4] remoteproc: st: add da to va support Loic Pallardy
2017-02-08  9:00   ` [v3,3/4] " Hugues FRUCHET
2017-01-31 12:35 ` [PATCH v3 4/4] remoteproc: core: don't allocate carveout if pa or da are defined Loic Pallardy
2017-02-08  9:00   ` [v3, " Hugues FRUCHET
2017-02-09  1:55   ` [PATCH v3 " Bjorn Andersson
2017-02-09 21:34     ` Loic PALLARDY

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=1485866156-6364-2-git-send-email-loic.pallardy@st.com \
    --to=loic.pallardy@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=hugues.fruchet@st.com \
    --cc=kernel@stlinux.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=patrice.chotard@st.com \
    --cc=peter.griffin@linaro.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).