소스 검색

RDMA/addr: Fix return of uninitialized ret value

Commit b23dd4fe42b4 ("ipv4: Make output route lookup return rtable
directly") resulted in leaving ret uninitialized, where it may later
be returned.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Sean Hefty 14 년 전
부모
커밋
1bdd6384c2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/infiniband/core/addr.c

+ 1 - 1
drivers/infiniband/core/addr.c

@@ -204,7 +204,7 @@ static int addr4_resolve(struct sockaddr_in *src_in,
 
 
 	/* If the device does ARP internally, return 'done' */
 	/* If the device does ARP internally, return 'done' */
 	if (rt->dst.dev->flags & IFF_NOARP) {
 	if (rt->dst.dev->flags & IFF_NOARP) {
-		rdma_copy_addr(addr, rt->dst.dev, NULL);
+		ret = rdma_copy_addr(addr, rt->dst.dev, NULL);
 		goto put;
 		goto put;
 	}
 	}