diff options
author | Ajay Singh | 2018-05-11 10:13:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-05-14 14:04:48 +0200 |
commit | 977febc9cfe3767f01a344dd6ebb8cc30621947b (patch) | |
tree | 828ba3ab4ba1b1a9bbedec217434b8f8789caf1f /drivers/staging/wilc1000 | |
parent | staging: wilc1000: rename u8security to avoid datatype in variable name (diff) | |
download | kernel-qcow2-linux-977febc9cfe3767f01a344dd6ebb8cc30621947b.tar.gz kernel-qcow2-linux-977febc9cfe3767f01a344dd6ebb8cc30621947b.tar.xz kernel-qcow2-linux-977febc9cfe3767f01a344dd6ebb8cc30621947b.zip |
staging: wilc1000: refactor del_station() to avoid parenthesis misalignment
Refactor the code to fix open parenthesis alignment issue reported by
checkpatch.pl script in del_station().
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 399dc1e31c11..e248702ee519 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1992,6 +1992,7 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev, s32 ret = 0; struct wilc_priv *priv; struct wilc_vif *vif; + struct sta_info *info; if (!wiphy) return -EFAULT; @@ -1999,16 +2000,17 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); vif = netdev_priv(dev); - if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) { - if (!mac) - ret = wilc_del_allstation(vif, - priv->assoc_stainfo.sta_associated_bss); + if (!(vif->iftype == AP_MODE || vif->iftype == GO_MODE)) + return ret; - ret = wilc_del_station(vif, mac); + info = &priv->assoc_stainfo; - if (ret) - netdev_err(dev, "Host delete station fail\n"); - } + if (!mac) + ret = wilc_del_allstation(vif, info->sta_associated_bss); + + ret = wilc_del_station(vif, mac); + if (ret) + netdev_err(dev, "Host delete station fail\n"); return ret; } |