Skip to content

Commit b2cf5d9

Browse files
Yang Yingliangdavem330
authored andcommitted
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: 6c635f7 ("octeontx2-af: cn10k: mcs: Handle MCS block interrupts") Signed-off-by: Yang Yingliang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 557f050 commit b2cf5d9

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+3
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/af/mcs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,10 @@ static int mcs_register_interrupts(struct mcs *mcs)
11821182
mcs_reg_write(mcs, MCSX_PAB_TX_SLAVE_PAB_INT_ENB, 0xff);
11831183

11841184
mcs->tx_sa_active = alloc_mem(mcs, mcs->hw->sc_entries);
1185-
if (!mcs->tx_sa_active)
1185+
if (!mcs->tx_sa_active) {
1186+
ret = -ENOMEM;
11861187
goto exit;
1188+
}
11871189

11881190
return ret;
11891191
exit:

0 commit comments

Comments
 (0)