diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-12-29 15:14:02 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-12-29 15:14:07 +0100 |
commit | 3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0 (patch) | |
tree | 45efce6311378bbd33378cdf2d5689ac4166cc73 /sound/soc/intel/skylake/skl-pcm.c | |
parent | ALSA: seq: fix kvmalloc_array() arguments order (diff) | |
parent | ALSA: hda/realtek: Add quirks for Dell models (diff) | |
download | linux-3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0.tar.xz linux-3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0.zip |
Merge branch 'topic/cs35l41' into for-next
Pull CS35L41 codec extension series.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/intel/skylake/skl-pcm.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 4d52e3b35850..613b27b8da13 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -245,8 +245,10 @@ static int skl_pcm_open(struct snd_pcm_substream *substream, snd_pcm_set_sync(substream); mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream); - if (!mconfig) + if (!mconfig) { + kfree(dma_params); return -EINVAL; + } skl_tplg_d0i3_get(skl, mconfig->d0i3_caps); @@ -1467,6 +1469,7 @@ int skl_platform_register(struct device *dev) dais = krealloc(skl->dais, sizeof(skl_fe_dai) + sizeof(skl_platform_dai), GFP_KERNEL); if (!dais) { + kfree(skl->dais); ret = -ENOMEM; goto err; } @@ -1479,8 +1482,10 @@ int skl_platform_register(struct device *dev) ret = devm_snd_soc_register_component(dev, &skl_component, skl->dais, num_dais); - if (ret) + if (ret) { + kfree(skl->dais); dev_err(dev, "soc component registration failed %d\n", ret); + } err: return ret; } |