]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bnx2x: fix an error code in bnx2x_nic_load()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 5 Aug 2021 10:38:26 +0000 (13:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2021 12:32:10 +0000 (13:32 +0100)
Set the error code if bnx2x_alloc_fw_stats_mem() fails.  The current
code returns success.

Fixes: ad5afc89365e ("bnx2x: Separate VF and PF logic")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

index 1a6ec1a12d53162579907e92c2bb142b53ac3e14..b5d954cb409ae4de9e6e6d70dede933a2154bbfa 100644 (file)
@@ -2669,7 +2669,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
        }
 
        /* Allocated memory for FW statistics  */
-       if (bnx2x_alloc_fw_stats_mem(bp))
+       rc = bnx2x_alloc_fw_stats_mem(bp);
+       if (rc)
                LOAD_ERROR_EXIT(bp, load_error0);
 
        /* request pf to initialize status blocks */