RDMA/mlx5: Remove extraneous error check
authorGal Pressman <pressmangal@gmail.com>
Mon, 8 Oct 2018 16:44:03 +0000 (19:44 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Oct 2018 06:21:38 +0000 (00:21 -0600)
Remove double error check from create user RQ error flow.

Fixes: 79b20a6c3014 ("IB/mlx5: Add receive Work Queue verbs")
Signed-off-by: Gal Pressman <pressmangal@gmail.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qp.c

index fa8e5dc65cb4e2ddfaeed2d79f5358394144d715..829aec3aba8fc7662d61294cd23d4aac03462abe 100644 (file)
@@ -5587,8 +5587,7 @@ static int prepare_user_rq(struct ib_pd *pd,
        err = create_user_rq(dev, pd, rwq, &ucmd);
        if (err) {
                mlx5_ib_dbg(dev, "err %d\n", err);
-               if (err)
-                       return err;
+               return err;
        }
 
        rwq->user_index = ucmd.user_index;