[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220113161315.126410-1-jiapeng.chong@linux.alibaba.com>
Date: Fri, 14 Jan 2022 00:13:15 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: ecree.xilinx@...il.com
Cc: habetsm.xilinx@...il.com, davem@...emloft.net, kuba@...nel.org,
ast@...nel.org, daniel@...earbox.net, hawk@...nel.org,
john.fastabend@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] sfc: Fix missing error code in efx_reset_up()
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'rc'.
Eliminate the follow smatch warning:
drivers/net/ethernet/sfc/efx_common.c:758 efx_reset_up() warn: missing
error code 'rc'.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
drivers/net/ethernet/sfc/efx_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index af37c990217e..bdfcda8bb5d0 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -754,8 +754,10 @@ int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok)
goto fail;
}
- if (!ok)
+ if (!ok) {
+ rc = -EINVAL;
goto fail;
+ }
if (efx->port_initialized && method != RESET_TYPE_INVISIBLE &&
method != RESET_TYPE_DATAPATH) {
--
2.20.1.7.g153144c
Powered by blists - more mailing lists