From: Jiapeng Chong Date: Tue, 27 Apr 2021 10:26:34 +0000 (+0800) Subject: ALSA: usb-audio: Remove redundant assignment to len X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a3ffcebc87480664aef7c8283394d4cf2aec327c;p=linux.git ALSA: usb-audio: Remove redundant assignment to len Variable len is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: sound/usb/mixer.c:2713:3: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1619519194-57806-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 2faf5767c7f8d..428d581f988fe 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2726,7 +2726,6 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, #define MAX_ITEM_NAME_LEN 64 for (i = 0; i < desc->bNrInPins; i++) { struct usb_audio_term iterm; - len = 0; namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL); if (!namelist[i]) { err = -ENOMEM;