staging: ks7010: remove redundant check
authorTobin C. Harding <me@tobin.cc>
Wed, 22 Mar 2017 02:06:26 +0000 (13:06 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2017 13:27:23 +0000 (14:27 +0100)
Function checks for condition inside a loop that checks the same
condition, this is redundant. Fix also removes checkpatch CHECK.

Remove redundant check.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index 38ea7a27bc08c7962296941d86efa49b98af3bf2..d329735fda1d73f09c71b6e2651c95143511f5be 100644 (file)
@@ -2608,8 +2608,7 @@ void hostif_sme_task(unsigned long dev)
        DPRINTK(3, "\n");
 
        if (priv->dev_state >= DEVICE_STATE_BOOT) {
-               if (cnt_smeqbody(priv) > 0
-                   && priv->dev_state >= DEVICE_STATE_BOOT) {
+               if (cnt_smeqbody(priv) > 0) {
                        hostif_sme_execute(priv,
                                           priv->sme_i.event_buff[priv->sme_i.
                                                                  qhead]);