From: Shiraz Saleem Date: Wed, 18 Jan 2017 17:48:29 +0000 (-0600) Subject: i40iw: Set maj_err and min_err in i40iw_sc_cqp_create X-Git-Tag: MMI-PSA29.97-13-9~6131^2~58 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f9fade5e77da67f618ac766ce1a6ded1679fb1a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reported-by: Yuval Shaia Signed-off-by: Shiraz Saleem Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford --- 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,