]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging: dgap: remove redundant error value check
authorDaeseok Youn <daeseok.youn@gmail.com>
Tue, 15 Jul 2014 09:47:11 +0000 (18:47 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jul 2014 15:26:29 +0000 (08:26 -0700)
The retval in dgap_block_til_ready() is initialized to zero,
and if no error has occurred in this function, the retval has a zero.
So it doesn't need to check "retval" itself.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 32988a8aead467f8a61cdfdc3fbb15ddbff8d6a1..10bd0f2e7a32bf5cb6ffb2c62ed25fb161b4054b 100644 (file)
@@ -2181,10 +2181,7 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file,
 
        spin_unlock_irqrestore(&ch->ch_lock, lock_flags);
 
-       if (retval)
-               return retval;
-
-       return 0;
+       return retval;
 }
 
 /*