Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c1c1908 authored by Ismail, Mustafa's avatar Ismail, Mustafa Committed by Doug Ledford
Browse files

RDMA/i40iw: Correct return code check in add_pble_pool



Move return code check to immediately after i40iw_hmc_sd_one call
where it is set instead of outside the then statement.

Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: default avatarFaisal Latif <faisal.latif@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent f69c3331
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ static enum i40iw_status_code add_pble_pool(struct i40iw_sc_dev *dev,
			sd_entry->u.pd_table.pd_page_addr.pa : sd_entry->u.bp.addr.pa;
	if (sd_entry->valid)
		return 0;
	if (dev->is_pf)
	if (dev->is_pf) {
		ret_code = i40iw_hmc_sd_one(dev, hmc_info->hmc_fn_id,
					    sd_reg_val, idx->sd_idx,
					    sd_entry->entry_type, true);
@@ -412,6 +412,7 @@ static enum i40iw_status_code add_pble_pool(struct i40iw_sc_dev *dev,
			i40iw_pr_err("cqp cmd failed for sd (pbles)\n");
			goto error;
		}
	}

	sd_entry->valid = true;
	return 0;