[alsa-devel] [PATCH] ASoC: wm_adsp: Release firmware on memory allocation failure
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> --- sound/soc/codecs/wm_adsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index b3fbe4a..a2144b0 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -630,7 +630,8 @@ static int wm_adsp_load(struct wm_adsp *dsp) GFP_KERNEL | GFP_DMA); if (!buf) { adsp_err(dsp, "Out of memory\n"); - return -ENOMEM; + ret = -ENOMEM; + goto out_fw; } ret = regmap_raw_write(regmap, reg, buf, -- 1.8.4.2
On Wed, Oct 30, 2013 at 05:03:44PM +0000, Dimitris Papastamos wrote:
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
This doesn't apply against current code either, please check and resend.
participants (2)
-
Dimitris Papastamos -
Mark Brown