Skip to content

Commit

Permalink
ASoC: wm0010: Remove redundant OOM message
Browse files Browse the repository at this point in the history
Let memory subsystem handle the error logging.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Jun 27, 2014
1 parent ac872d3 commit 84cbc75
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions sound/soc/codecs/wm0010.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)

xfer = kzalloc(sizeof(*xfer), GFP_KERNEL);
if (!xfer) {
dev_err(codec->dev, "Failed to allocate xfer\n");
ret = -ENOMEM;
goto abort;
}
Expand All @@ -423,17 +422,13 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)

out = kzalloc(len, GFP_KERNEL | GFP_DMA);
if (!out) {
dev_err(codec->dev,
"Failed to allocate RX buffer\n");
ret = -ENOMEM;
goto abort1;
}
xfer->t.rx_buf = out;

img = kzalloc(len, GFP_KERNEL | GFP_DMA);
if (!img) {
dev_err(codec->dev,
"Failed to allocate image buffer\n");
ret = -ENOMEM;
goto abort1;
}
Expand Down Expand Up @@ -526,14 +521,12 @@ static int wm0010_stage2_load(struct snd_soc_codec *codec)
/* Copy to local buffer first as vmalloc causes problems for dma */
img = kzalloc(fw->size, GFP_KERNEL | GFP_DMA);
if (!img) {
dev_err(codec->dev, "Failed to allocate image buffer\n");
ret = -ENOMEM;
goto abort2;
}

out = kzalloc(fw->size, GFP_KERNEL | GFP_DMA);
if (!out) {
dev_err(codec->dev, "Failed to allocate output buffer\n");
ret = -ENOMEM;
goto abort1;
}
Expand Down Expand Up @@ -679,11 +672,8 @@ static int wm0010_boot(struct snd_soc_codec *codec)
}

img_swap = kzalloc(len, GFP_KERNEL | GFP_DMA);
if (!img_swap) {
dev_err(codec->dev,
"Failed to allocate image buffer\n");
if (!img_swap)
goto abort;
}

/* We need to re-order for 0010 */
byte_swap_64((u64 *)&pll_rec, img_swap, len);
Expand Down

0 comments on commit 84cbc75

Please sign in to comment.