Commit b2cf5d90 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

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: 6c635f78 ("octeontx2-af: cn10k: mcs: Handle MCS block interrupts")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 557f0501
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment