]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Fix assigned error return value that is never used
authorColin Ian King <colin.king@canonical.com>
Tue, 6 Jul 2021 11:18:02 +0000 (12:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jul 2021 22:22:25 +0000 (15:22 -0700)
commit977bad71a676a9fd932b8cc39d34c05912ce3ead
tree5149c05190cb05f3fb1bc4b37dac68b0f7e0acf2
parenteb2139c8b9102d4079d117f9ef77655a743c6634
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: d10266c4143f ("octeontx2-pf: offload DMAC filters to CGX/RPM block")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c