aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-12 14:23:52 -0700
committerDavid S. Miller <davem@davemloft.net>2005-09-12 14:23:52 -0700
commit9b37ee75858ce35cf3c0e4724acaf4efabb45687 (patch)
tree5ea2b68ca964fa7c5e64590d7c72b4dd5cc79762
parent6ddcf626fd0a3cbf410ceb483cb76074ed1c5873 (diff)
downloadlinux-linaro-9b37ee75858ce35cf3c0e4724acaf4efabb45687.tar.gz
[NETROM/AX.25/ROSE]: Remove useless tests
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>
-rw-r--r--net/ax25/af_ax25.c6
-rw-r--r--net/netrom/af_netrom.c4
-rw-r--r--net/rose/af_rose.c4
3 files changed, 3 insertions, 11 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 17f192b7786..9c487311e0a 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -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 */
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index f4578c759ff..02b1ab52dbb 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -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;
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 3077878ed4f..977f99a9cfc 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -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: