Skip to content

Commit a3ffceb

Browse files
wb-zjp846396tiwai
authored andcommitted
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 <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1619519194-57806-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 970e301 commit a3ffceb

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

sound/usb/mixer.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,6 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid,
27262726
#define MAX_ITEM_NAME_LEN 64
27272727
for (i = 0; i < desc->bNrInPins; i++) {
27282728
struct usb_audio_term iterm;
2729-
len = 0;
27302729
namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL);
27312730
if (!namelist[i]) {
27322731
err = -ENOMEM;

0 commit comments

Comments
 (0)