Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570681

[PATCH v3 1/4] remoteproc: st: correct probe error management

From Loic Pallardy <loic.pallardy@st.com>
Newsgroups linux.kernel
Subject [PATCH v3 1/4] remoteproc: st: correct probe error management
Date 2017-01-31 13:40 +0100
Message-ID <t5FT4-Ha-15@gated-at.bofh.it> (permalink)
References <t5FT3-Ha-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] remoteproc: st: add virtio_rpmsg support Loic Pallardy <loic.pallardy@st.com> - 2017-01-31 13:40 +0100
  [PATCH v3 3/4] remoteproc: st: add da to va support Loic Pallardy <loic.pallardy@st.com> - 2017-01-31 13:40 +0100
    Re: [v3,3/4] remoteproc: st: add da to va support Hugues FRUCHET <hugues.fruchet@st.com> - 2017-02-08 10:20 +0100
  [PATCH v3 1/4] remoteproc: st: correct probe error management Loic Pallardy <loic.pallardy@st.com> - 2017-01-31 13:40 +0100
    Re: [PATCH v3 1/4] remoteproc: st: correct probe error management Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-02-07 06:20 +0100
      RE: [PATCH v3 1/4] remoteproc: st: correct probe error management Loic PALLARDY <loic.pallardy@st.com> - 2017-02-07 23:30 +0100
  [PATCH v3 2/4] remoteproc: st: add virtio communication support Loic Pallardy <loic.pallardy@st.com> - 2017-01-31 13:40 +0100
  [PATCH v3 4/4] remoteproc: core: don't allocate carveout if pa or da are defined Loic Pallardy <loic.pallardy@st.com> - 2017-01-31 13:40 +0100
    Re: [v3, 4/4] remoteproc: core: don't allocate carveout if pa or da  are defined Hugues FRUCHET <hugues.fruchet@st.com> - 2017-02-08 10:20 +0100
    Re: [PATCH v3 4/4] remoteproc: core: don't allocate carveout if pa  or da are defined Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-02-09 03:30 +0100
      RE: [PATCH v3 4/4] remoteproc: core: don't allocate carveout if pa or  da are defined Loic PALLARDY <loic.pallardy@st.com> - 2017-02-09 22:40 +0100

csiph-web