[PATCH for-next] RDMA/rxe: rxe_get_av always receives ahp hence no put is needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function rxe_get_av is only used by rxe_requester, and the ahp double
pointer is always sent. Hence there is no need to do the check.
rxe_requester also always performs the put for ah, hence that is also not
needed.

Signed-off-by: Md Haris Iqbal <haris.phnx@xxxxxxxxx>
---
 drivers/infiniband/sw/rxe/rxe_av.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 3b05314ca739..0780ffcf24a6 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -130,11 +130,7 @@ struct rxe_av *rxe_get_av(struct rxe_pkt_info *pkt, struct rxe_ah **ahp)
 			rxe_put(ah);
 			return NULL;
 		}
-
-		if (ahp)
-			*ahp = ah;
-		else
-			rxe_put(ah);
+		*ahp = ah;
 
 		return &ah->av;
 	}
-- 
2.25.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux