Skip to content

Commit

Permalink
ipx: Remove spurious NULL checking in ipx_ioctl().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed May 19, 2012
1 parent 72e843b commit 32e9072
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/ipx/af_ipx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 32e9072

Please sign in to comment.