diff options
| author | Jean Sacren <[email protected]> | 2021-10-12 07:46:45 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2021-10-13 15:42:01 +0000 |
| commit | 50515cac8d0ea2026db2f0cb456bfa51d5e8e85f (patch) | |
| tree | 21d59a0548899a7d07c113b6c5fe81af40ecf31f /drivers/net/ethernet/qlogic/qed/qed_debug.c | |
| parent | net: enetc: include ip6_checksum.h for csum_ipv6_magic (diff) | |
| download | kernel-50515cac8d0ea2026db2f0cb456bfa51d5e8e85f.tar.gz kernel-50515cac8d0ea2026db2f0cb456bfa51d5e8e85f.zip | |
net: qed_debug: fix check of false (grc_param < 0) expression
The type of enum dbg_grc_params has the enumerator list starting from 0.
When grc_param is declared by enum dbg_grc_params, (grc_param < 0) is
always false. We should remove the check of this expression.
Signed-off-by: Jean Sacren <[email protected]>
Acked-by: Shai Malin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_debug.c')
| -rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c index f6198b9a1b02..e3edca187ddf 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_debug.c +++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c @@ -5256,7 +5256,7 @@ enum dbg_status qed_dbg_grc_config(struct qed_hwfn *p_hwfn, */ qed_dbg_grc_init_params(p_hwfn); - if (grc_param >= MAX_DBG_GRC_PARAMS || grc_param < 0) + if (grc_param >= MAX_DBG_GRC_PARAMS) return DBG_STATUS_INVALID_ARGS; if (val < s_grc_param_defs[grc_param].min || val > s_grc_param_defs[grc_param].max) |
