Skip to content

Commit

Permalink
i40iw: Simplify code
Browse files Browse the repository at this point in the history
Axe a few lines of code and re-use existing error handling path to avoid
code duplication.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Christophe Jaillet authored and Doug Ledford committed Aug 18, 2017
1 parent 7806def commit 02654b5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/infiniband/hw/i40iw/i40iw_pble.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,16 @@ static enum i40iw_status_code add_bp_pages(struct i40iw_sc_dev *dev,
status = i40iw_add_sd_table_entry(dev->hw, hmc_info,
info->idx.sd_idx, I40IW_SD_TYPE_PAGED,
I40IW_HMC_DIRECT_BP_SIZE);
if (status) {
i40iw_free_vmalloc_mem(dev->hw, chunk);
return status;
}
if (status)
goto error;
if (!dev->is_pf) {
status = i40iw_vchnl_vf_add_hmc_objs(dev, I40IW_HMC_IW_PBLE,
fpm_to_idx(pble_rsrc,
pble_rsrc->next_fpm_addr),
(info->pages << PBLE_512_SHIFT));
if (status) {
i40iw_pr_err("allocate PBLEs in the PF. Error %i\n", status);
i40iw_free_vmalloc_mem(dev->hw, chunk);
return status;
goto error;
}
}
addr = chunk->vaddr;
Expand Down

0 comments on commit 02654b5

Please sign in to comment.