Rationalize fasync return values
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / pipe.c
index 14f502b89cf5c2eb46cf8f2fb476d055a7fb118a..94ad15967cf90ddc04467a093247b1da7879a3fd 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -667,10 +667,7 @@ pipe_read_fasync(int fd, struct file *filp, int on)
        retval = fasync_helper(fd, filp, on, &inode->i_pipe->fasync_readers);
        mutex_unlock(&inode->i_mutex);
 
-       if (retval < 0)
-               return retval;
-
-       return 0;
+       return retval;
 }
 
 
@@ -684,10 +681,7 @@ pipe_write_fasync(int fd, struct file *filp, int on)
        retval = fasync_helper(fd, filp, on, &inode->i_pipe->fasync_writers);
        mutex_unlock(&inode->i_mutex);
 
-       if (retval < 0)
-               return retval;
-
-       return 0;
+       return retval;
 }
 
 
@@ -706,11 +700,7 @@ pipe_rdwr_fasync(int fd, struct file *filp, int on)
                        fasync_helper(-1, filp, 0, &pipe->fasync_readers);
        }
        mutex_unlock(&inode->i_mutex);
-
-       if (retval < 0)
-               return retval;
-
-       return 0;
+       return retval;
 }