From: Takashi Sakamoto Date: Sat, 14 Dec 2019 13:13:51 +0000 (+0900) Subject: ALSA: control: remove useless assignment in .info callback of PCM chmap element X-Git-Tag: v5.10.7~3274^2~197 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1faa9d3a3ea7852761ff403f5a9d4a409c0bb199;p=platform%2Fkernel%2Flinux-rpi.git ALSA: control: remove useless assignment in .info callback of PCM chmap element Control elements for PCM chmap return information to userspace abount the maximum number of available PCM channels as the number of values in the element. In current implementation the number is once initialized to zero, then assigned to. This is useless and this commit fixes it. Fixes: 2d3391ec0ecc ("ALSA: PCM: channel mapping API implementation") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191214131351.28950-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai --- diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 2236b5e..6f0a00f 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2308,7 +2308,6 @@ static int pcm_chmap_ctl_info(struct snd_kcontrol *kcontrol, struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 0; uinfo->count = info->max_channels; uinfo->value.integer.min = 0; uinfo->value.integer.max = SNDRV_CHMAP_LAST;