alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm_adsp: Release firmware on error
@ 2013-01-21  9:02 Charles Keepax
  2013-01-22  7:40 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2013-01-21  9:02 UTC (permalink / raw)
  To: broonie; +Cc: tiwai, alsa-devel, patches, Charles Keepax

This patch correctly releases the firmware if the magic string in the
firmware header does not match.

Change-Id: I2d08f7fff92b2f0e0f2ab1fb937007e3783f815e
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm_adsp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 4196f2d..b6b6548 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -396,7 +396,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
 	hdr = (void*)&firmware->data[0];
 	if (memcmp(hdr->magic, "WMDR", 4) != 0) {
 		adsp_err(dsp, "%s: invalid magic\n", file);
-		return -EINVAL;
+		goto out_fw;
 	}
 
 	adsp_dbg(dsp, "%s: v%d.%d.%d\n", file,
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: wm_adsp: Release firmware on error
  2013-01-21  9:02 [PATCH] ASoC: wm_adsp: Release firmware on error Charles Keepax
@ 2013-01-22  7:40 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-01-22  7:40 UTC (permalink / raw)
  To: Charles Keepax; +Cc: tiwai, alsa-devel, patches


[-- Attachment #1.1: Type: text/plain, Size: 444 bytes --]

On Mon, Jan 21, 2013 at 09:02:31AM +0000, Charles Keepax wrote:
> This patch correctly releases the firmware if the magic string in the
> firmware header does not match.
> 
> Change-Id: I2d08f7fff92b2f0e0f2ab1fb937007e3783f815e
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Applied but:
 - Don't include noise like Change-Ids in upstream submissions.
 - Always CC maintainers on patches (you've missed Liam).

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-22  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21  9:02 [PATCH] ASoC: wm_adsp: Release firmware on error Charles Keepax
2013-01-22  7:40 ` Mark Brown

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).