This commit refactors ks_wlan_set_wps_enable function to
improve readability handling the error first to avoid an
'else'.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        if (priv->sleep_mode == SLP_SLEEP)
                return -EPERM;
        /* for SLEEP MODE */
-       if (*uwrq == 0 || *uwrq == 1)
-               priv->wps.wps_enabled = *uwrq;
-       else
+       if (*uwrq != 0 && *uwrq != 1)
                return -EINVAL;
 
+       priv->wps.wps_enabled = *uwrq;
        hostif_sme_enqueue(priv, SME_WPS_ENABLE_REQUEST);
 
        return 0;