diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-19 00:51:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-19 00:51:04 -0400 |
commit | 32e9072b92a1c556a303d8d0e0d64feb667e601d (patch) | |
tree | 0d9e1b50ea9e7fed9cf43dad1261c82c49838c70 /net/ipx | |
parent | 72e843bb09d4533208aa5573861a983c46914019 (diff) | |
download | linux-stable-32e9072b92a1c556a303d8d0e0d64feb667e601d.tar.gz linux-stable-32e9072b92a1c556a303d8d0e0d64feb667e601d.tar.bz2 linux-stable-32e9072b92a1c556a303d8d0e0d64feb667e601d.zip |
ipx: Remove spurious NULL checking in ipx_ioctl().
We already unconditionally dereference 'sk' via lock_sock(sk) earlier
in this function, and our caller (sock_do_ioctl()) makes takes similar
liberties.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipx')
-rw-r--r-- | net/ipx/af_ipx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 824d4a3338ae..dfd6faaf0ea7 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c @@ -1901,9 +1901,7 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) (const unsigned short __user *)argp); break; case SIOCGSTAMP: - rc = -EINVAL; - if (sk) - rc = sock_get_timestamp(sk, argp); + rc = sock_get_timestamp(sk, argp); break; case SIOCGIFDSTADDR: case SIOCSIFDSTADDR: |