mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
octeontx2-af: Fix rvu_mbox_init return path
rvu_mbox_init function makes use of error path for
freeing memory which are local to the function in
both success and failure conditions. This is unusual hence
fix it by returning zero on success. With new cn20k code this
is freeing valid memory in success case also.
Fixes: e53ee4acb2 ("octeontx2-af: CN20k basic mbox operations and structures")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4f4040ea5d
commit
0289c51f88
|
|
@ -2573,7 +2573,11 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
|
|||
mwork->rvu = rvu;
|
||||
INIT_WORK(&mwork->work, mbox_up_handler);
|
||||
}
|
||||
goto free_regions;
|
||||
|
||||
kfree(mbox_regions);
|
||||
bitmap_free(pf_bmap);
|
||||
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
destroy_workqueue(mw->mbox_wq);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user