]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
RDMA/i40iw: Correct return code check in add_pble_pool
authorIsmail, Mustafa <mustafa.ismail@intel.com>
Mon, 18 Apr 2016 15:33:04 +0000 (10:33 -0500)
committerDoug Ledford <dledford@redhat.com>
Thu, 28 Apr 2016 20:32:54 +0000 (16:32 -0400)
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: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_pble.c

index ded853d2fad8ee91af5d152a8f8ed78e9787ccd5..85993dc44f6e687d4920ae85676035e34e07cf71 100644 (file)
@@ -404,13 +404,14 @@ 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);
-       if (ret_code) {
-               i40iw_pr_err("cqp cmd failed for sd (pbles)\n");
-               goto error;
+               if (ret_code) {
+                       i40iw_pr_err("cqp cmd failed for sd (pbles)\n");
+                       goto error;
+               }
        }
 
        sd_entry->valid = true;