From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
broonie@kernel.org,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
Vinod Koul <vinod.koul@intel.com>
Subject: [PATCH 2/3] ASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init fails
Date: Fri, 30 Oct 2015 20:34:19 +0530 [thread overview]
Message-ID: <1446217461-2106-3-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1446217461-2106-1-git-send-email-vinod.koul@intel.com>
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
This patch fixes the below warning reported by Dan by invoking
skl_sst_dsp_cleanup() in cleanup path on error and not bailing out
sound/soc/intel/skylake/skl-sst.c:270 skl_sst_dsp_init()
info: ignoring unreachable code.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/intel/skylake/skl-sst.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index 3b83dc99f1d4..5c5a244942ef 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -259,15 +259,16 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
ret = sst->fw_ops.load_fw(sst);
if (ret < 0) {
dev_err(dev, "Load base fw failed : %d", ret);
- return ret;
+ goto cleanup;
}
if (dsp)
*dsp = skl;
- return 0;
+ return ret;
- skl_ipc_free(&skl->ipc);
+cleanup:
+ skl_sst_dsp_cleanup(dev, skl);
return ret;
}
EXPORT_SYMBOL_GPL(skl_sst_dsp_init);
--
1.9.1
next prev parent reply other threads:[~2015-10-30 15:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 15:04 [PATCH 0/3] ASoC: Intel: Skylake: Some more fixes Vinod Koul
2015-10-30 15:04 ` [PATCH 1/3] ASoC: Intel: Skylake: fix missing machine device creation Vinod Koul
2015-11-01 2:54 ` Mark Brown
2015-11-02 10:11 ` Vinod Koul
2015-11-02 12:07 ` Mark Brown
2015-11-02 15:32 ` Vinod Koul
2015-11-03 11:24 ` Mark Brown
2015-11-03 12:29 ` Keyon
2015-11-03 17:58 ` Vinod Koul
2015-11-03 17:57 ` Vinod Koul
2015-11-04 14:29 ` Mark Brown
2015-11-04 16:07 ` Vinod Koul
2015-10-30 15:04 ` Vinod Koul [this message]
2015-11-02 10:39 ` Applied "ASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init fails" to the asoc tree Mark Brown
2015-10-30 15:04 ` [PATCH 3/3] ASoC: Intel: Skylake: Fix substream dereference before check Vinod Koul
2015-11-02 10:39 ` Applied "ASoC: Intel: Skylake: Fix substream dereference before check" to the asoc tree Mark Brown
2015-10-30 15:04 ` [PATCH 0/3] ASoC: Intel: Skylake: Some more fixes Vinod Koul
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=1446217461-2106-3-git-send-email-vinod.koul@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=subhransu.s.prusty@intel.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