diff options
Diffstat (limited to 'net/rds/recv.c')
-rw-r--r-- | net/rds/recv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c index de339b24ca14..bd82522534fc 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c | |||
@@ -402,7 +402,7 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, | |||
402 | struct rds_sock *rs = rds_sk_to_rs(sk); | 402 | struct rds_sock *rs = rds_sk_to_rs(sk); |
403 | long timeo; | 403 | long timeo; |
404 | int ret = 0, nonblock = msg_flags & MSG_DONTWAIT; | 404 | int ret = 0, nonblock = msg_flags & MSG_DONTWAIT; |
405 | struct sockaddr_in *sin; | 405 | DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); |
406 | struct rds_incoming *inc = NULL; | 406 | struct rds_incoming *inc = NULL; |
407 | 407 | ||
408 | /* udp_recvmsg()->sock_recvtimeo() gets away without locking too.. */ | 408 | /* udp_recvmsg()->sock_recvtimeo() gets away without locking too.. */ |
@@ -479,7 +479,6 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, | |||
479 | 479 | ||
480 | rds_stats_inc(s_recv_delivered); | 480 | rds_stats_inc(s_recv_delivered); |
481 | 481 | ||
482 | sin = (struct sockaddr_in *)msg->msg_name; | ||
483 | if (sin) { | 482 | if (sin) { |
484 | sin->sin_family = AF_INET; | 483 | sin->sin_family = AF_INET; |
485 | sin->sin_port = inc->i_hdr.h_sport; | 484 | sin->sin_port = inc->i_hdr.h_sport; |