ALSA: pcm: Fix mmap capability check
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 09:26:40 +0000 (11:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 12:35:43 +0000 (14:35 +0200)
commitebaa67086fae3faf402028f9957e8d15ee8f95ba
tree75a6668c5bdd7f978621560e00b5275f4aabcccb
parent431e31105579f22c778d02cfcb3b23bd28d69d32
ALSA: pcm: Fix mmap capability check

commit c4824ae7db418aee6f50f308a20b832e58e997fd upstream.

The hw_support_mmap() doesn't cover all memory allocation types and
might use a wrong device pointer for checking the capability.
Check the all memory allocation types more completely.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210720092640.12338-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/pcm_native.c