diff options
author | Tobin C. Harding <me@tobin.cc> | 2017-04-10 13:15:45 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-11 16:03:36 +0200 |
commit | 482c03c7b5f6d323f333ae59bf1c55ef2e24b1f2 (patch) | |
tree | 0487ada8c3f6d0a2994610bea14e4bd52063587f /drivers/staging/ks7010/ks7010_sdio.c | |
parent | fa740a9e2e19708bc38993375da671c979082095 (diff) |
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: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010/ks7010_sdio.c')
-rw-r--r-- | drivers/staging/ks7010/ks7010_sdio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 1db59c6946bc..42e96e113747 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -177,8 +177,10 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv) if (priv->reg.powermgt == POWMGT_ACTIVE_MODE) return; - if (priv->reg.operation_mode != MODE_INFRASTRUCTURE || - (priv->connect_status & CONNECT_STATUS_MASK) != CONNECT_STATUS) + if (priv->reg.operation_mode != MODE_INFRASTRUCTURE) + return; + + if ((priv->connect_status & CONNECT_STATUS_MASK) != CONNECT_STATUS) return; if (priv->dev_state != DEVICE_STATE_SLEEP) |