Commit 482c03c7 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: separate dissimilar checks

Function contains a list of four checks, for no apparent reason two of them
are OR'ed together. Having two OR'ed together and the other two not
implies some connection between the two that are combined. It is
easier to read this code if the four unrelated checks are done as
separate statements.

Move dissimilar expressions out of logical continuation and into
separate statement.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fa740a9e
...@@ -177,8 +177,10 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv) ...@@ -177,8 +177,10 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
if (priv->reg.powermgt == POWMGT_ACTIVE_MODE) if (priv->reg.powermgt == POWMGT_ACTIVE_MODE)
return; return;
if (priv->reg.operation_mode != MODE_INFRASTRUCTURE || if (priv->reg.operation_mode != MODE_INFRASTRUCTURE)
(priv->connect_status & CONNECT_STATUS_MASK) != CONNECT_STATUS) return;
if ((priv->connect_status & CONNECT_STATUS_MASK) != CONNECT_STATUS)
return; return;
if (priv->dev_state != DEVICE_STATE_SLEEP) if (priv->dev_state != DEVICE_STATE_SLEEP)
......
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