summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5514-spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/rt5514-spi.c')
-rw-r--r--sound/soc/codecs/rt5514-spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c
index 09103aab0cb2..7d410e39d1a0 100644
--- a/sound/soc/codecs/rt5514-spi.c
+++ b/sound/soc/codecs/rt5514-spi.c
@@ -253,6 +253,8 @@ static int rt5514_spi_pcm_probe(struct snd_soc_platform *platform)
rt5514_dsp = devm_kzalloc(platform->dev, sizeof(*rt5514_dsp),
GFP_KERNEL);
+ if (!rt5514_dsp)
+ return -ENOMEM;
rt5514_dsp->dev = &rt5514_spi->dev;
mutex_init(&rt5514_dsp->dma_lock);