ALSA: pci: echoaudio: remove variable which is a constant
authorWolfram Sang <wsa@the-dreams.de>
Thu, 13 Jun 2019 16:04:23 +0000 (18:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 13 Jun 2019 16:39:22 +0000 (18:39 +0200)
Checking a variable which is always '1' has no use.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/echoaudio/echoaudio_dsp.c

index b181752b8481cf2df1b2e0da829caf3910ed0d63..50d4a87a6bb34b57ead7cee72a5e2ceb0924b74f 100644 (file)
@@ -1058,7 +1058,6 @@ static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe,
 {
        int i;
        u32 channel_mask;
-       char is_cyclic;
 
        dev_dbg(chip->card->dev,
                "allocate_pipes: ch=%d int=%d\n", pipe_index, interleave);
@@ -1066,8 +1065,6 @@ static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe,
        if (chip->bad_board)
                return -EIO;
 
-       is_cyclic = 1;  /* This driver uses cyclic buffers only */
-
        for (channel_mask = i = 0; i < interleave; i++)
                channel_mask |= 1 << (pipe_index + i);
        if (chip->pipe_alloc_mask & channel_mask) {
@@ -1078,8 +1075,8 @@ static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe,
 
        chip->comm_page->position[pipe_index] = 0;
        chip->pipe_alloc_mask |= channel_mask;
-       if (is_cyclic)
-               chip->pipe_cyclic_mask |= channel_mask;
+       /* This driver uses cyclic buffers only */
+       chip->pipe_cyclic_mask |= channel_mask;
        pipe->index = pipe_index;
        pipe->interleave = interleave;
        pipe->state = PIPE_STATE_STOPPED;