summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 14:27:17 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-05 11:05:20 +0100
commit8f74ae398aa0b96207de366e9a723517e440e590 (patch)
tree9bc4569912f0f26aef0cc6e6fa9ed0c76319afe1
parentASoC: amd: Avoid passing NULL to memory allocators (diff)
downloadlinux-8f74ae398aa0b96207de366e9a723517e440e590.tar.xz
linux-8f74ae398aa0b96207de366e9a723517e440e590.zip
ASoC: sh: Avoid passing NULL to memory allocators
We should pass a proper non-NULL device object to memory allocators although it was accepted in the past. The card->dev points to the most appropriate device object in such a case, so let's put it. Acked-by: Christoph Hellwig <hch@lst.de> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/soc/sh/siu_pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index e263757e4a69..23384c477740 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -542,7 +542,7 @@ static int siu_pcm_new(struct snd_soc_pcm_runtime *rtd)
return ret;
ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
- SNDRV_DMA_TYPE_DEV, NULL,
+ SNDRV_DMA_TYPE_DEV, card->dev,
SIU_BUFFER_BYTES_MAX, SIU_BUFFER_BYTES_MAX);
if (ret < 0) {
dev_err(card->dev,