提交 9b37ee75 编写于 作者: R Ralf Baechle 提交者: David S. Miller

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

Remove error tests that have already been performed by the caller.
Signed-off-by: NRalf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ddcf626
......@@ -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 */
......
......@@ -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;
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册