ALSA: memalloc: Catch call with NULL snd_dma_buffer pointer
authorTakashi Iwai <tiwai@suse.de>
Fri, 5 Nov 2021 10:21:03 +0000 (11:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Nov 2021 10:04:40 +0000 (11:04 +0100)
commitc85582ef7d42d0e756b9289e259980f55a68cc66
treeae847997bb60648150414d4783a0283d62ebeab1
parent61ef4e2f3fbf1b3e36202424264b8f20de620501
ALSA: memalloc: Catch call with NULL snd_dma_buffer pointer

[ Upstream commit dce9446192439eaac81c21f517325fb473735e53 ]

Although we've covered all calls with NULL dma buffer pointer, so far,
there may be still some else in the wild.  For catching such a case
more easily, add a WARN_ON_ONCE() in snd_dma_get_ops().

Fixes: 37af81c5998f ("ALSA: core: Abstract memory alloc helpers")
Link: https://lore.kernel.org/r/20211105102103.28148-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/memalloc.c