Skip to content

Commit

Permalink
[NETROM/AX.25/ROSE]: Remove useless tests
Browse files Browse the repository at this point in the history
Remove error tests that have already been performed by the caller.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
ralfbaechle authored and davem330 committed Sep 12, 2005
1 parent 6ddcf62 commit 9b37ee7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions net/ax25/af_ax25.c
Expand Up @@ -1700,11 +1700,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}

case SIOCGSTAMP:
if (sk != NULL) {
res = sock_get_timestamp(sk, argp);
break;
}
res = -EINVAL;
res = sock_get_timestamp(sk, argp);
break;

case SIOCAX25ADDUID: /* Add a uid to the uid/call map table */
Expand Down
4 changes: 1 addition & 3 deletions net/netrom/af_netrom.c
Expand Up @@ -1187,9 +1187,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}

case SIOCGSTAMP:
ret = -EINVAL;
if (sk != NULL)
ret = sock_get_timestamp(sk, argp);
ret = sock_get_timestamp(sk, argp);
release_sock(sk);
return ret;

Expand Down
4 changes: 1 addition & 3 deletions net/rose/af_rose.c
Expand Up @@ -1256,9 +1256,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}

case SIOCGSTAMP:
if (sk != NULL)
return sock_get_timestamp(sk, (struct timeval __user *)argp);
return -EINVAL;
return sock_get_timestamp(sk, (struct timeval __user *)argp);

case SIOCGIFADDR:
case SIOCSIFADDR:
Expand Down

0 comments on commit 9b37ee7

Please sign in to comment.