diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-05-13 19:11:11 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-14 09:48:33 +0200 |
commit | e73b4c9e7fa7fc8870d472b73a155e891f1f4022 (patch) | |
tree | 30a9163816c00ac1825daa13c543f9dddce8882c /sound/pci/hda/hda_generic.c | |
parent | d0f5137b1a986de80ed71d9fd141976ef239d2ca (diff) | |
download | lwn-e73b4c9e7fa7fc8870d472b73a155e891f1f4022.tar.gz lwn-e73b4c9e7fa7fc8870d472b73a155e891f1f4022.zip |
ALSA: hda: generic: Remove redundant assignment to dac
Variable dac is set to zero, but this value is never read as it is
overwritten or not used later on, hence it is a redundant assignment
and can be removed.
Clean up the following clang-analyzer warning:
sound/pci/hda/hda_generic.c:1436:4: warning: Value stored to 'dac' 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/1620904271-76027-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r-- | sound/pci/hda/hda_generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index b638fc2ef6f7..fc0295790f63 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -1433,7 +1433,7 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs, path = snd_hda_add_new_path(codec, dac, pin, 0); } if (!path) { - dac = dacs[i] = 0; + dacs[i] = 0; badness += bad->no_dac; } else { /* print_nid_path(codec, "output", path); */ |