octeontx2-af: Fix rvu_mbox_init return path
authorSubbaraya Sundeep <sbhatta@marvell.com>
Wed, 18 Jun 2025 13:57:16 +0000 (19:27 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jun 2025 11:37:12 +0000 (12:37 +0100)
commit0289c51f889e435a7626931688023a80090d9c5e
tree6e0253bf94e7977d033834dafa6fd8467377449c
parent4f4040ea5d3e4bebebbef9379f88085c8b99221c
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: e53ee4acb220 ("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>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c