Message ID | 20190204134222.9560-5-tiwai@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ALSA: Fix remaining NULL device with memory allocations | expand |
On Mon, Feb 04, 2019 at 02:42:21PM +0100, Takashi Iwai wrote: > 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: Mark Brown <broonie@kernel.org>
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index e263757e4a69..23384c477740 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c @@ -542,7 +542,7 @@ static int siu_pcm_new(struct snd_soc_pcm_runtime *rtd) return ret; ret = snd_pcm_lib_preallocate_pages_for_all(pcm, - SNDRV_DMA_TYPE_DEV, NULL, + SNDRV_DMA_TYPE_DEV, card->dev, SIU_BUFFER_BYTES_MAX, SIU_BUFFER_BYTES_MAX); if (ret < 0) { dev_err(card->dev,
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. Signed-off-by: Takashi Iwai <tiwai@suse.de> --- sound/soc/sh/siu_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)