Commit ad1f3797 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

octeontx2-pf: Fix assigned error return value that is never used

Currently when the call to otx2_mbox_alloc_msg_cgx_mac_addr_update fails
the error return variable rc is being assigned -ENOMEM and does not
return early. rc is then re-assigned and the error case is not handled
correctly. Fix this by returning -ENOMEM rather than assigning rc.

Addresses-Coverity: ("Unused value")
Fixes: 79d2be38 ("octeontx2-pf: offload DMAC filters to CGX/RPM block")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ddef2ad
......@@ -161,7 +161,7 @@ int otx2_dmacflt_update(struct otx2_nic *pf, u8 *mac, u8 bit_pos)
if (!req) {
mutex_unlock(&pf->mbox.lock);
rc = -ENOMEM;
return -ENOMEM;
}
ether_addr_copy(req->mac_addr, mac);
......
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