IB/rxe: avoid unnecessary NULL check
authorZhu Yanjun <yanjun.zhu@oracle.com>
Thu, 14 Jun 2018 09:45:42 +0000 (05:45 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Jun 2018 19:16:30 +0000 (13:16 -0600)
Before goto err2, the variable qp is checked. So it is not necessary
to check qp in label err2.

Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rxe/rxe_recv.c

index 42797ac6f7b161d6eed3293861b5a5d65350a002..cc5cfd156758e02c86a32bce080e8681404b2622 100644 (file)
@@ -256,8 +256,7 @@ static int hdr_check(struct rxe_pkt_info *pkt)
        return 0;
 
 err2:
-       if (qp)
-               rxe_drop_ref(qp);
+       rxe_drop_ref(qp);
 err1:
        return -EINVAL;
 }