aboutsummaryrefslogtreecommitdiff
path: root/term/users.c
diff options
context:
space:
mode:
Diffstat (limited to 'term/users.c')
-rw-r--r--term/users.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/term/users.c b/term/users.c
index 59f02b66..b7429a4f 100644
--- a/term/users.c
+++ b/term/users.c
@@ -2181,19 +2181,12 @@ S_term_get_peername (struct trivfs_protid *cred,
return EOPNOTSUPP;
if (!cred || (cred->pi.class != tty_class && cred->pi.class != pty_class))
- {
- if (cred)
- ports_port_deref (cred);
- return EOPNOTSUPP;
- }
+ return EOPNOTSUPP;
peer = (cred->pi.class == tty_class) ? ptyctl : termctl;
if (bottom != &ptyio_bottom || !peer->hook)
- {
- ports_port_deref (cred);
- return ENOENT;
- }
+ return ENOENT;
strcpy (name, (char *) peer->hook);