From: Takashi Iwai Date: Mon, 4 Feb 2019 13:27:01 +0000 (+0100) Subject: ASoC: amd: Avoid passing NULL to memory allocators X-Git-Tag: v5.4-rc1~1151^2~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18d33cdb0b30392dd8f0a3ebd224c3253d07ae47;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Mark Brown Signed-off-by: Takashi Iwai --- diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 3d58338..3e7d409 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); }