]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
ALSA: pcm: Use ERESTARTSYS instead of EINTR in OSS emulation
authorTakashi Iwai <tiwai@suse.de>
Tue, 9 Jan 2018 07:51:02 +0000 (08:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:29:27 +0000 (09:29 +0200)
commit c64ed5dd9feba193c76eb460b451225ac2a0d87b upstream.

Fix the last standing EINTR in the whole subsystem.  Use more correct
ERESTARTSYS for pending signals.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/oss/pcm_oss.c

index fb3431a160d2f31b89ae8a316eed97015d7f333a..d884e57addc019ce788afd111c050626f8a43227 100644 (file)
@@ -852,7 +852,7 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream,
                if (!(mutex_trylock(&runtime->oss.params_lock)))
                        return -EAGAIN;
        } else if (mutex_lock_interruptible(&runtime->oss.params_lock))
-               return -EINTR;
+               return -ERESTARTSYS;
        sw_params = kzalloc(sizeof(*sw_params), GFP_KERNEL);
        params = kmalloc(sizeof(*params), GFP_KERNEL);
        sparams = kmalloc(sizeof(*sparams), GFP_KERNEL);