Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block
[cascardo/linux.git] / sound / soc / fsl / imx-pcm-dma.c
index 1fc01ed..f3d3d1f 100644 (file)
@@ -62,6 +62,8 @@ int imx_pcm_dma_init(struct platform_device *pdev, size_t size)
 
        config = devm_kzalloc(&pdev->dev,
                        sizeof(struct snd_dmaengine_pcm_config), GFP_KERNEL);
+       if (!config)
+               return -ENOMEM;
        *config = imx_dmaengine_pcm_config;
        if (size)
                config->prealloc_buffer_size = size;