Commit 43bc3bf6 authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Mark Brown

ASoC: wm_adsp: Print error when regmap reads/writes fail

Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 959f5854
...@@ -396,8 +396,8 @@ static int wm_coeff_write_control(struct snd_kcontrol *kcontrol, ...@@ -396,8 +396,8 @@ static int wm_coeff_write_control(struct snd_kcontrol *kcontrol,
ret = regmap_raw_write(adsp->regmap, reg, scratch, ret = regmap_raw_write(adsp->regmap, reg, scratch,
ctl->len); ctl->len);
if (ret) { if (ret) {
adsp_err(adsp, "Failed to write %zu bytes to %x\n", adsp_err(adsp, "Failed to write %zu bytes to %x: %d\n",
ctl->len, reg); ctl->len, reg, ret);
kfree(scratch); kfree(scratch);
return ret; return ret;
} }
...@@ -450,8 +450,8 @@ static int wm_coeff_read_control(struct snd_kcontrol *kcontrol, ...@@ -450,8 +450,8 @@ static int wm_coeff_read_control(struct snd_kcontrol *kcontrol,
ret = regmap_raw_read(adsp->regmap, reg, scratch, ctl->len); ret = regmap_raw_read(adsp->regmap, reg, scratch, ctl->len);
if (ret) { if (ret) {
adsp_err(adsp, "Failed to read %zu bytes from %x\n", adsp_err(adsp, "Failed to read %zu bytes from %x: %d\n",
ctl->len, reg); ctl->len, reg, ret);
kfree(scratch); kfree(scratch);
return ret; return ret;
} }
...@@ -1313,8 +1313,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) ...@@ -1313,8 +1313,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
le32_to_cpu(blk->len)); le32_to_cpu(blk->len));
if (ret != 0) { if (ret != 0) {
adsp_err(dsp, adsp_err(dsp,
"%s.%d: Failed to write to %x in %s\n", "%s.%d: Failed to write to %x in %s: %d\n",
file, blocks, reg, region_name); file, blocks, reg, region_name, ret);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment