Skip to content

Commit 3f9fade

Browse files
shirazsaleemdledford
authored andcommitted
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 <[email protected]> Reported-by: Yuval Shaia <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 564649b commit 3f9fade

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/infiniband/hw/i40iw/i40iw_ctrl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp,
450450
u32 cnt = 0, p1, p2, val = 0, err_code;
451451
enum i40iw_status_code ret_code;
452452

453+
*maj_err = 0;
454+
*min_err = 0;
455+
453456
ret_code = i40iw_allocate_dma_mem(cqp->dev->hw,
454457
&cqp->sdbuf,
455458
128,

0 commit comments

Comments
 (0)