[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221009015126.4131090-1-yangyingliang@huawei.com>
Date: Sun, 9 Oct 2022 09:51:26 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <netdev@...r.kernel.org>
CC: <gakula@...vell.com>, <vattunuru@...vell.com>,
<sgoutham@...vell.com>, <sbhatta@...vell.com>,
<davem@...emloft.net>
Subject: [PATCH net] octeontx2-af: cn10k: mcs: Fix error return code in mcs_register_interrupts()
If alloc_mem() fails in mcs_register_interrupts(), it should return error
code.
Fixes: 6c635f78c474 ("octeontx2-af: cn10k: mcs: Handle MCS block interrupts")
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
index 5ba618aed6ad..4a343f853b28 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
@@ -1182,8 +1182,10 @@ static int mcs_register_interrupts(struct mcs *mcs)
mcs_reg_write(mcs, MCSX_PAB_TX_SLAVE_PAB_INT_ENB, 0xff);
mcs->tx_sa_active = alloc_mem(mcs, mcs->hw->sc_entries);
- if (!mcs->tx_sa_active)
+ if (!mcs->tx_sa_active) {
+ ret = -ENOMEM;
goto exit;
+ }
return ret;
exit:
--
2.25.1
Powered by blists - more mailing lists