On Mon, Sep 07, 2020 at 03:09:18PM +0300, Leon Romanovsky wrote: > -void mlx5_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata) > +int mlx5_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata) > { > struct mlx5_ib_dev *dev = to_mdev(cq->device); > struct mlx5_ib_cq *mcq = to_mcq(cq); > + int ret; > > - mlx5_core_destroy_cq(dev->mdev, &mcq->mcq); > - if (udata) > + ret = mlx5_core_destroy_cq(dev->mdev, &mcq->mcq); > + if (ret && udata) > + return ret; No udata check here Jason