diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 7483922f6ee3f4f8a523b05a00f8ce1f1e2a94e2..2a6c569d991fa968fcb8dbb88fe6cdc7cd22870c 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -299,7 +299,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, !dev->of_node) return 0; - if (config->dma_dev) { + if (config && config->dma_dev) { /* * If this warning is seen, it probably means that your Linux * device structure does not match your HW device structure. @@ -317,7 +317,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, name = "rx-tx"; else name = dmaengine_pcm_dma_channel_names[i]; - if (config->chan_names[i]) + if (config && config->chan_names[i]) name = config->chan_names[i]; chan = dma_request_slave_channel_reason(dev, name); if (IS_ERR(chan)) {