mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
staging: ks7010: avoid an 'else' in ks_wlan_set_power
Change if logic to handle invalid case for operation_mode at first avoiding an 'else' path. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
afa10db0e1
commit
f3b0bd2395
1 changed files with 2 additions and 3 deletions
|
|
@ -1045,10 +1045,9 @@ static int ks_wlan_set_power(struct net_device *dev,
|
|||
if (vwrq->power.disabled) {
|
||||
priv->reg.power_mgmt = POWER_MGMT_ACTIVE;
|
||||
} else {
|
||||
if (priv->reg.operation_mode == MODE_INFRASTRUCTURE)
|
||||
priv->reg.power_mgmt = POWER_MGMT_SAVE1;
|
||||
else
|
||||
if (priv->reg.operation_mode != MODE_INFRASTRUCTURE)
|
||||
return -EINVAL;
|
||||
priv->reg.power_mgmt = POWER_MGMT_SAVE1;
|
||||
}
|
||||
|
||||
hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST);
|
||||
|
|
|
|||
Loading…
Reference in a new issue