staging: ks7010: avoid if-else condition in ks_wlan_get_power
The if-else code in ks_wlan_get_power function is not needed at all and can be achieved with a simple boolean assignation. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f3b0bd2395
commit
1df964acca
@ -1064,10 +1064,7 @@ static int ks_wlan_get_power(struct net_device *dev,
|
||||
if (priv->sleep_mode == SLP_SLEEP)
|
||||
return -EPERM;
|
||||
/* for SLEEP MODE */
|
||||
if (priv->reg.power_mgmt > 0)
|
||||
vwrq->power.disabled = 0;
|
||||
else
|
||||
vwrq->power.disabled = 1;
|
||||
vwrq->power.disabled = (priv->reg.power_mgmt <= 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user