diff options
author | Shiraz Saleem <shiraz.saleem@intel.com> | 2022-02-17 16:18:50 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-02-23 20:24:18 +0100 |
commit | 45225a93ccc01a93f7fbffef4fcb2d9c649fe71e (patch) | |
tree | 68400781bbe62f398bbbaecf90cb2a33431e4876 /drivers/infiniband/hw/irdma/main.c | |
parent | RDMA/irdma: Remove enum irdma_status_code (diff) | |
download | linux-45225a93ccc01a93f7fbffef4fcb2d9c649fe71e.tar.xz linux-45225a93ccc01a93f7fbffef4fcb2d9c649fe71e.zip |
RDMA/irdma: Propagate error codes
All functions now return linux error codes. Propagate the return from
these functions as opposed to converting them to generic values.
Link: https://lore.kernel.org/r/20220217151851.1518-3-shiraz.saleem@intel.com
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/irdma/main.c')
-rw-r--r-- | drivers/infiniband/hw/irdma/main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/irdma/main.c b/drivers/infiniband/hw/irdma/main.c index 6558d5e1ade5..babbe8ad5afa 100644 --- a/drivers/infiniband/hw/irdma/main.c +++ b/drivers/infiniband/hw/irdma/main.c @@ -176,7 +176,7 @@ static int irdma_lan_register_qset(struct irdma_sc_vsi *vsi, ret = ice_add_rdma_qset(pf, &qset); if (ret) { ibdev_dbg(&iwdev->ibdev, "WS: LAN alloc_res for rdma qset failed.\n"); - return -EINVAL; + return ret; } tc_node->l2_sched_node_id = qset.teid; @@ -280,10 +280,9 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_ irdma_fill_device_info(iwdev, pf, vsi); rf = iwdev->rf; - if (irdma_ctrl_init_hw(rf)) { - err = -EIO; + err = irdma_ctrl_init_hw(rf); + if (err) goto err_ctrl_init; - } l2params.mtu = iwdev->netdev->mtu; ice_get_qos_params(pf, &qos_info); @@ -291,10 +290,9 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_ if (iwdev->rf->protocol_used != IRDMA_IWARP_PROTOCOL_ONLY) iwdev->dcb_vlan_mode = l2params.num_tc > 1 && !l2params.dscp_mode; - if (irdma_rt_init_hw(iwdev, &l2params)) { - err = -EIO; + err = irdma_rt_init_hw(iwdev, &l2params); + if (err) goto err_rt_init; - } err = irdma_ib_register_device(iwdev); if (err) |