staging: ks7010: fix checkpatch BRACES
authorTobin C. Harding <me@tobin.cc>
Tue, 21 Mar 2017 02:37:06 +0000 (13:37 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Mar 2017 07:56:07 +0000 (08:56 +0100)
Checkpatch emits CHECK: Unbalanced braces around else
statement. Statements in question are single statements so we do not
need braces. Checkpatch also warns about multiple line dereference for
this code.

Fix if/else/else if statement use of braces. Fix function argument layout
at the same time since it is the same statement.

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 db10e168ab3e5113f3c15b624c4dafa227f51f4e..68e26f42a4c89f18b713ce34bed5ac8480714c37 100644 (file)
@@ -2456,19 +2456,15 @@ void hostif_sme_execute(struct ks_wlan_private *priv, int event)
                hostif_phy_information_request(priv);
                break;
        case SME_MIC_FAILURE_REQUEST:
-               if (priv->wpa.mic_failure.failure == 1) {
-                       hostif_mic_failure_request(priv,
-                                                  priv->wpa.mic_failure.
-                                                  failure - 1, 0);
-               } else if (priv->wpa.mic_failure.failure == 2) {
-                       hostif_mic_failure_request(priv,
-                                                  priv->wpa.mic_failure.
-                                                  failure - 1,
-                                                  priv->wpa.mic_failure.
-                                                  counter);
-               } else
-                       DPRINTK(4,
-                               "SME_MIC_FAILURE_REQUEST: failure count=%u error?\n",
+               if (priv->wpa.mic_failure.failure == 1)
+                       hostif_mic_failure_request(
+                               priv, priv->wpa.mic_failure.failure - 1, 0);
+               else if (priv->wpa.mic_failure.failure == 2)
+                       hostif_mic_failure_request(
+                               priv, priv->wpa.mic_failure.failure - 1,
+                               priv->wpa.mic_failure.counter);
+               else
+                       DPRINTK(4, "SME_MIC_FAILURE_REQUEST: failure count=%u error?\n",
                                priv->wpa.mic_failure.failure);
                break;
        case SME_MIC_FAILURE_CONFIRM: