]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/rtl8192e: Erroneous return codes (types and values)
authorDominique van den Broeck <domdevlin@free.fr>
Sun, 27 Apr 2014 17:11:15 +0000 (19:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 May 2014 00:21:59 +0000 (20:21 -0400)
This function returns a bool, that is supposed to be false when something
goes wrong. It's assumed this way by its lone calling function (which is
SetRFPowerState8190(), line 1445 of rtl8192e/rtl8192e/r8192E_phy.c)

Despite of this, this procedure returns non-null enumerations values or
negative codes instead. This patch fixes this.

Signed-off-by: Dominique van den Broeck <domdevlin@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c

index fa087b654ebc8df7982c36dc4b0767d056f356b4..356d5217e9d426ab235012263d10f23ad5d41d0e 100644 (file)
@@ -3029,7 +3029,7 @@ bool NicIFEnableNIC(struct net_device *dev)
                RT_TRACE(COMP_ERR, "ERR!!! %s(): Driver is already down!\n",
                         __func__);
                priv->bdisable_nic = false;
-               return RT_STATUS_FAILURE;
+               return false;
        }
 
        RT_TRACE(COMP_PS, "===========>%s()\n", __func__);
@@ -3039,7 +3039,7 @@ bool NicIFEnableNIC(struct net_device *dev)
                RT_TRACE(COMP_ERR, "ERR!!! %s(): initialization is failed!\n",
                         __func__);
                priv->bdisable_nic = false;
-               return -1;
+               return false;
        }
        RT_TRACE(COMP_INIT, "start adapter finished\n");
        RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC);