Commit 9b37ee75 authored by Ralf Baechle's avatar Ralf Baechle Committed by David S. Miller
Browse files

[NETROM/AX.25/ROSE]: Remove useless tests



Remove error tests that have already been performed by the caller.
Signed-off-by: default avatarRalf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ddcf626
...@@ -1700,11 +1700,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1700,11 +1700,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
} }
case SIOCGSTAMP: case SIOCGSTAMP:
if (sk != NULL) { res = sock_get_timestamp(sk, argp);
res = sock_get_timestamp(sk, argp);
break;
}
res = -EINVAL;
break; break;
case SIOCAX25ADDUID: /* Add a uid to the uid/call map table */ case SIOCAX25ADDUID: /* Add a uid to the uid/call map table */
......
...@@ -1187,9 +1187,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1187,9 +1187,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
} }
case SIOCGSTAMP: case SIOCGSTAMP:
ret = -EINVAL; ret = sock_get_timestamp(sk, argp);
if (sk != NULL)
ret = sock_get_timestamp(sk, argp);
release_sock(sk); release_sock(sk);
return ret; return ret;
......
...@@ -1256,9 +1256,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1256,9 +1256,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
} }
case SIOCGSTAMP: case SIOCGSTAMP:
if (sk != NULL) return sock_get_timestamp(sk, (struct timeval __user *)argp);
return sock_get_timestamp(sk, (struct timeval __user *)argp);
return -EINVAL;
case SIOCGIFADDR: case SIOCGIFADDR:
case SIOCSIFADDR: case SIOCSIFADDR:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment