diff options
Diffstat (limited to 'sound/soc/codecs/wm8958-dsp2.c')
-rw-r--r-- | sound/soc/codecs/wm8958-dsp2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c index 0293763debe5..8d4ea43d40a3 100644 --- a/sound/soc/codecs/wm8958-dsp2.c +++ b/sound/soc/codecs/wm8958-dsp2.c @@ -55,11 +55,14 @@ static int wm8958_dsp2_fw(struct snd_soc_codec *codec, const char *name, return 0; if (fw->size < 32) { - dev_err(codec->dev, "%s: firmware too short\n", name); + dev_err(codec->dev, "%s: firmware too short (%d bytes)\n", + name, fw->size); goto err; } 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; |