diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-05-10 16:07:40 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-05-10 17:05:16 +0200 |
commit | 8d879be882ba5a8bd4c2bc39bd2c336392564e13 (patch) | |
tree | 14d5315cd45c1cc60fa04cc8435cadaec5f25d9a /sound/firewire/amdtp-stream.c | |
parent | 62f00e40b0718ebd8bd54fc7a9e89e873524d495 (diff) | |
download | op-kernel-dev-8d879be882ba5a8bd4c2bc39bd2c336392564e13.zip op-kernel-dev-8d879be882ba5a8bd4c2bc39bd2c336392564e13.tar.gz |
ALSA: pcm: Bail out when chmap is already present
When snd_pcm_add_chmap_ctls() is called to the PCM stream to which a
chmap has been already assigned, it returns as an error due to the
conflicting snd_ctl_add() result. However, this also clears the
already assigned chmap_kctl field via pcm_chmap_ctl_private_free(),
and becomes inconsistent in the later operation.
This patch adds the check of the conflicting chmap kctl before
actually trying to allocate / assign. The check failure is treated as
a kernel warning, as the double call of snd_pcm_add_chmap_ctls() is
basically a driver bug and having the stack trace would help
developers to figure out the bad code path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
0 files changed, 0 insertions, 0 deletions