]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Don't treat NULL chmap as a fatal error
authorTakashi Iwai <tiwai@suse.de>
Wed, 14 Jun 2017 14:20:32 +0000 (16:20 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 14 Jun 2017 14:20:32 +0000 (16:20 +0200)
commitb25ce8ae60d050ddf1b7166a272ded3cec14885f
treea577f7290d78183fb0e39438c461eb67d95f3004
parent3557c09f8cfee51c60ded28bbd794f0ab888f59d
ALSA: pcm: Don't treat NULL chmap as a fatal error

The standard PCM chmap helper callbacks treat the NULL info->chmap as
a fatal error and spews the kernel warning with stack trace when
CONFIG_SND_DEBUG is on.  This was OK, originally it was supposed to be
always static and non-NULL.  But, as the recent addition of Intel LPE
audio driver shows, the chmap content may vary dynamically, and it can
be even NULL when disconnected.  The user still sees the kernel
warning unnecessarily.

For clearing such a confusion, this patch simply removes the
snd_BUG_ON() in each place, just returns an error without warning.

Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_lib.c