diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 14:27:01 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-05 11:04:57 +0100 |
commit | 18d33cdb0b30392dd8f0a3ebd224c3253d07ae47 (patch) | |
tree | 80d06d03cdda8d0e9bfd9b83f0245e047b3aeeb1 /sound/soc/amd | |
parent | ALSA: arm: Avoid passing NULL to memory allocators (diff) | |
download | linux-18d33cdb0b30392dd8f0a3ebd224c3253d07ae47.tar.xz linux-18d33cdb0b30392dd8f0a3ebd224c3253d07ae47.zip |
ASoC: amd: 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>
Diffstat (limited to 'sound/soc/amd')
-rw-r--r-- | sound/soc/amd/raven/acp3x-pcm-dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 3d58338fa3cf..3e7d4099364c 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -369,7 +369,8 @@ static int acp3x_dma_new(struct snd_soc_pcm_runtime *rtd) { return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, - NULL, MIN_BUFFER, + rtd->pcm->card->dev, + MIN_BUFFER, MAX_BUFFER); } |