Skip to content

Commit

Permalink
net: toshiba: remove a redundant local variable 'index_specified'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhong jiang authored and David S. Miller committed Sep 20, 2018
1 parent 23d9f55 commit 684d777
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand All @@ -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) {
Expand Down

0 comments on commit 684d777

Please sign in to comment.