summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-27 14:48:26 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:25 -0400
commitcb0942b81249798e15c3f04eee2946ef543e8115 (patch)
tree7d494c580a847342577661782c5173f76178aa81 /drivers/tty
parentcecb46f194460d23cacf3b13593f9f5a4f7a0fed (diff)
downloadop-kernel-dev-cb0942b81249798e15c3f04eee2946ef543e8115.zip
op-kernel-dev-cb0942b81249798e15c3f04eee2946ef543e8115.tar.gz
make get_file() return its argument
simplifies a bunch of callers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/tty_io.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 71d95cf..c7561f2 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1163,10 +1163,8 @@ ssize_t redirected_tty_write(struct file *file, const char __user *buf,
struct file *p = NULL;
spin_lock(&redirect_lock);
- if (redirect) {
- get_file(redirect);
- p = redirect;
- }
+ if (redirect)
+ p = get_file(redirect);
spin_unlock(&redirect_lock);
if (p) {
@@ -2246,8 +2244,7 @@ static int tioccons(struct file *file)
spin_unlock(&redirect_lock);
return -EBUSY;
}
- get_file(file);
- redirect = file;
+ redirect = get_file(file);
spin_unlock(&redirect_lock);
return 0;
}
OpenPOWER on IntegriCloud