提交 3f9fade5 编写于 作者: S Shiraz Saleem 提交者: Doug Ledford

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: NDan Carpenter <dan.carpenter@oracle.com>
Reported-by: NYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: NShiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: NYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 564649b4
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册