]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: x86: Avoid passing NULL to memory allocators
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 13:24:52 +0000 (14:24 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:51:34 +0000 (16:51 +0100)
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/x86/intel_hdmi_audio.c

index 16ca91f57e7f460b1ad412f2ce7767d4c3e93166..80f79ecffc7108e2818812eb151e62670987d297 100644 (file)
@@ -1812,7 +1812,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
                 * try to allocate 600k buffer as default which is large enough
                 */
                snd_pcm_lib_preallocate_pages_for_all(pcm,
-                                                     SNDRV_DMA_TYPE_DEV_UC, NULL,
+                                                     SNDRV_DMA_TYPE_DEV_UC,
+                                                     card->dev,
                                                      HAD_DEFAULT_BUFFER, HAD_MAX_BUFFER);
 
                /* create controls */