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>
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)