diff --git a/[refs] b/[refs] index e3cdd18efccf..a29f1c3850d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 51b6dfb627d785ee92c2bd1e159e2de47cdc29c3 +refs/heads/master: 50e8ce14698273d3c493b2e66f323f6b18eac099 diff --git a/trunk/sound/soc/imx/imx-pcm-fiq.c b/trunk/sound/soc/imx/imx-pcm-fiq.c index 6b518e07eea9..b2bf27282cd2 100644 --- a/trunk/sound/soc/imx/imx-pcm-fiq.c +++ b/trunk/sound/soc/imx/imx-pcm-fiq.c @@ -192,6 +192,8 @@ static int snd_imx_open(struct snd_pcm_substream *substream) int ret; iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); + if (iprtd == NULL) + return -ENOMEM; runtime->private_data = iprtd; iprtd->substream = substream; @@ -202,8 +204,10 @@ static int snd_imx_open(struct snd_pcm_substream *substream) ret = snd_pcm_hw_constraint_integer(substream->runtime, SNDRV_PCM_HW_PARAM_PERIODS); - if (ret < 0) + if (ret < 0) { + kfree(iprtd); return ret; + } snd_soc_set_runtime_hwparams(substream, &snd_imx_hardware); return 0;