Skip to contentSkip to conversation

ASoC: WM8958: correctly show firmware magic on mismatch

PATCH Applied Jonathan Neuschäfer 2 participants 2 messages Dec 11, 2011 – Dec 12, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: WM8958: correctly show firmware magic on mismatch

---
This patch is untested.

 sound/soc/codecs/wm8958-dsp2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8958-dsp2.c +2 -0
index 0293763..5a14d5c 100644
@@ -60,6 +60,8 @@ static int wm8958_dsp2_fw(struct snd_soc_codec *codec, const char *name,
 	}
 
 	if (memcmp(fw->data, "WMFW", 4) != 0) {
+		memcpy(&data32, fw->data, sizeof(data32));
+		data32 = be32_to_cpu(data32);
 		dev_err(codec->dev, "%s: firmware has bad file magic %08x\n",
 			name, data32);
 		goto err;
Signature · 1 line
1.7.7.3