summaryrefslogtreecommitdiff
path: root/sound/x86
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 14:24:52 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-04 16:51:34 +0100
commitc7c3fec8a524774dbd1daf7841df1217dd589298 (patch)
tree9764071ea192f17f849ab985b5df784955ae7b56 /sound/x86
parent0b6a2c9cf4a00f54a0916499ece8a5cf3cced385 (diff)
downloadlinux-next-c7c3fec8a524774dbd1daf7841df1217dd589298.tar.gz
ALSA: x86: 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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r--sound/x86/intel_hdmi_audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 16ca91f57e7f..80f79ecffc71 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -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 */