diff options
author | Shiraz Saleem <shiraz.saleem@intel.com> | 2017-01-18 18:48:29 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-01-24 22:20:37 +0100 |
commit | 3f9fade5e77da67f618ac766ce1a6ded1679fb1a (patch) | |
tree | 78cc8eb3e681b1cadc61451dcf67dc5e746adefe /drivers/infiniband/hw/i40iw/i40iw_ctrl.c | |
parent | IB/qib: Remove empty function (diff) | |
download | linux-3f9fade5e77da67f618ac766ce1a6ded1679fb1a.tar.xz linux-3f9fade5e77da67f618ac766ce1a6ded1679fb1a.zip |
i40iw: Set maj_err and min_err in i40iw_sc_cqp_create
Set maj_err and min_err in i40iw_sc_cqp_create so that it
returns correct values for all return cases. This also
addresses an uninitialized variable warning for maj_err and
min_err in i40iw_create_cqp.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_ctrl.c')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c index ed84584a97b7..f82483b3d1e7 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c @@ -450,6 +450,9 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp, u32 cnt = 0, p1, p2, val = 0, err_code; enum i40iw_status_code ret_code; + *maj_err = 0; + *min_err = 0; + ret_code = i40iw_allocate_dma_mem(cqp->dev->hw, &cqp->sdbuf, 128, |