ALSA: vx: vx_pcm: remove redundant assignment

Fix cppcheck warning:

sound/drivers/vx/vx_pcm.c:539:30: style: Variable
'chip->playback_pipes[audio]' is reassigned a value before the old one
has been used. [redundantAssignment]
 chip->playback_pipes[audio] = pipe;
                             ^
sound/drivers/vx/vx_pcm.c:533:31: note: chip->playback_pipes[audio] is
assigned
  chip->playback_pipes[audio] = pipe;
                              ^
sound/drivers/vx/vx_pcm.c:539:30: note: chip->playback_pipes[audio] is
overwritten
 chip->playback_pipes[audio] = pipe;
                             ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200902212133.30964-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Pierre-Louis Bossart 2020-09-02 16:21:32 -05:00 committed by Takashi Iwai
parent b7dcd6ac02
commit e408ab068a

View File

@ -530,7 +530,6 @@ static int vx_pcm_playback_open(struct snd_pcm_substream *subs)
err = vx_alloc_pipe(chip, 0, audio, 2, &pipe); /* stereo playback */
if (err < 0)
return err;
chip->playback_pipes[audio] = pipe;
}
/* open for playback */
pipe->references++;