summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/toshiba
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-20 03:56:05 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-20 08:08:36 +0200
commit684d777a3382da53eb6688b92f7626eb526be0a6 (patch)
treed3c05b07daca11adb3cade74c14ba4da64d6423a /drivers/net/ethernet/toshiba
parentnfp: provide a better warning when ring allocation fails (diff)
downloadlinux-684d777a3382da53eb6688b92f7626eb526be0a6.tar.xz
linux-684d777a3382da53eb6688b92f7626eb526be0a6.zip
net: toshiba: remove a redundant local variable 'index_specified'
The local variable 'index_specified' is never used after being assigned. hence it should be redundant adn can be removed. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/toshiba')
-rw-r--r--drivers/net/ethernet/toshiba/ps3_gelic_wireless.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
index 302079e22b06..00ab417694ad 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
@@ -1094,7 +1094,7 @@ static int gelic_wl_get_encode(struct net_device *netdev,
struct gelic_wl_info *wl = port_wl(netdev_priv(netdev));
struct iw_point *enc = &data->encoding;
unsigned long irqflag;
- unsigned int key_index, index_specified;
+ unsigned int key_index;
int ret = 0;
pr_debug("%s: <-\n", __func__);
@@ -1105,13 +1105,10 @@ static int gelic_wl_get_encode(struct net_device *netdev,
return -EINVAL;
spin_lock_irqsave(&wl->lock, irqflag);
- if (key_index) {
- index_specified = 1;
+ if (key_index)
key_index--;
- } else {
- index_specified = 0;
+ else
key_index = wl->current_key;
- }
if (wl->group_cipher_method == GELIC_WL_CIPHER_WEP) {
switch (wl->auth_method) {