[PATCH] qed: Fix missing error code in qed_slowpath_start()

From: Jiapeng Chong
Date: Sat Oct 09 2021 - 04:15:24 EST


From: chongjiapeng <jiapeng.chong@xxxxxxxxxxxxxxxxx>

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/qlogic/qed/qed_main.c:1298 qed_slowpath_start()
warn: missing error code 'rc'.

Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
Fixes: d51e4af5c209 ("qed: aRFS infrastructure support")
Signed-off-by: chongjiapeng <jiapeng.chong@xxxxxxxxxxxxxxxxx>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 5e7242304ee2..359ad859ae18 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1295,6 +1295,7 @@ static int qed_slowpath_start(struct qed_dev *cdev,
} else {
DP_NOTICE(cdev,
"Failed to acquire PTT for aRFS\n");
+ rc = -EINVAL;
goto err;
}
}
--
2.19.1.6.gb485710b