Commit 1df964ac authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

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: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f3b0bd23
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment