Message ID | 20210706111802.27114-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ad1f37970875eef98eeaf478f55045f388b794a5 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [next] octeontx2-pf: Fix assigned error return value that is never used | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 6 Jul 2021 12:18:02 +0100 you wrote: > From: Colin Ian King <colin.king@canonical.com> > > 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. > > [...] Here is the summary with links: - [next] octeontx2-pf: Fix assigned error return value that is never used https://git.kernel.org/netdev/net/c/ad1f37970875 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c index ffe3e94562d0..383a6b5cb698 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c @@ -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);