Skip to content

Commit

Permalink
ALSA: x86: Avoid passing NULL to memory allocators
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 4, 2019
1 parent 0b6a2c9 commit c7c3fec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit c7c3fec

Please sign in to comment.