ALSA: line6: Remove double line6_pcm_release() after failed acquire.
authorAndrej Krutak <dev@andree.sk>
Thu, 18 Aug 2016 21:52:10 +0000 (23:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Aug 2016 09:36:58 +0000 (11:36 +0200)
If there's an error, pcm is released in line6_pcm_acquire already.

Fixes: 247d95ee6dd2 ('ALSA: line6: Handle error from line6_pcm_acquire()')
Cc: <stable@vger.kernel.org> # v4.0+
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Andrej Krutak <dev@andree.sk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/pcm.c

index 204cc074adb96f8f99ebd9d69bd7e1e4cf91f98e..2bc8879757f9779a9cb8f3237aa49f0872629e75 100644 (file)
@@ -55,7 +55,6 @@ static int snd_line6_impulse_volume_put(struct snd_kcontrol *kcontrol,
                err = line6_pcm_acquire(line6pcm, LINE6_STREAM_IMPULSE);
                if (err < 0) {
                        line6pcm->impulse_volume = 0;
-                       line6_pcm_release(line6pcm, LINE6_STREAM_IMPULSE);
                        return err;
                }
        } else {