ibverbs/rxe: Remove variable self-initialization
authorMaksym Planeta <mplaneta@os.inf.tu-dresden.de>
Tue, 2 Jul 2019 13:49:28 +0000 (15:49 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 7 Jul 2019 12:19:38 +0000 (09:19 -0300)
In some cases (not in this particular one) variable self-initialization
can lead to undefined behavior. In this case, it is just obscure code.

Signed-off-by: Maksym Planeta <mplaneta@os.inf.tu-dresden.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rxe/rxe_comp.c

index 00eb99d3df8666b94633ab901433a2e470be27ac..116cafc9afcf601a2a040831668947be785c49ed 100644 (file)
@@ -558,7 +558,7 @@ int rxe_completer(void *arg)
 {
        struct rxe_qp *qp = (struct rxe_qp *)arg;
        struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
-       struct rxe_send_wqe *wqe = wqe;
+       struct rxe_send_wqe *wqe = NULL;
        struct sk_buff *skb = NULL;
        struct rxe_pkt_info *pkt = NULL;
        enum comp_state state;