From: Ralf Baechle Date: Mon, 12 Sep 2005 21:23:52 +0000 (-0700) Subject: [NETROM/AX.25/ROSE]: Remove useless tests X-Git-Tag: v2.6.14-rc1~7^2~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b37ee75858ce35cf3c0e4724acaf4efabb45687;p=linux-2.6 [NETROM/AX.25/ROSE]: Remove useless tests Remove error tests that have already been performed by the caller. Signed-off-by: Ralf Baechle DL5RB Signed-off-by: David S. Miller --- diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 17f192b778..9c487311e0 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 f4578c759f..02b1ab52db 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 3077878ed4..977f99a9cf 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: