diff options
author | Nathan Chancellor | 2018-05-06 09:33:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-05-07 04:11:23 +0200 |
commit | 1cbe5fe261a19b4a9a482cd24b12d1d063abaa44 (patch) | |
tree | b89a8c563b148e30d370751ea9f8acd69ee2b19c /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |
parent | staging: wilc1000: Remove useless function (diff) | |
download | kernel-qcow2-linux-1cbe5fe261a19b4a9a482cd24b12d1d063abaa44.tar.gz kernel-qcow2-linux-1cbe5fe261a19b4a9a482cd24b12d1d063abaa44.tar.xz kernel-qcow2-linux-1cbe5fe261a19b4a9a482cd24b12d1d063abaa44.zip |
staging: wilc1000: Remove unnecessary array index check
This statment triggers GCC's -Wtype-limit since key_index is an
unsigned integer so it cannot be less than zero.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index b499fb987395..e0015ca6c21a 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1054,7 +1054,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev, } } - if (key_index >= 0 && key_index <= 3 && priv->wep_key_len[key_index]) { + if (key_index <= 3 && priv->wep_key_len[key_index]) { memset(priv->wep_key[key_index], 0, priv->wep_key_len[key_index]); priv->wep_key_len[key_index] = 0; |