ASoC: WM8958: correctly show firmware magic on mismatch
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sun, 11 Dec 2011 18:15:49 +0000 (19:15 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 12 Dec 2011 04:44:02 +0000 (12:44 +0800)
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8958-dsp2.c

index 0293763debe5811160fb3b7cc23284a91df2a94a..5a14d5c0e0e1b6dc98fb39140a4ca47f6bd18294 100644 (file)
@@ -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;