From: Takashi Iwai Date: Mon, 4 Feb 2019 13:26:27 +0000 (+0100) Subject: ALSA: arm: Avoid passing NULL to memory allocators X-Git-Tag: v5.4-rc1~1151^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc70a9d70052c45483c2ef6a7fe08638cf88f490;p=platform%2Fkernel%2Flinux-rpi.git ALSA: arm: 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 0c3f073..a2d4b41 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -941,7 +941,8 @@ static int aaci_init_pcm(struct aaci *aaci) snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - NULL, 0, 64 * 1024); + aaci->card->dev, + 0, 64 * 1024); } return ret;