[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398618676-31095-1-git-send-email-domdevlin@free.fr>
Date: Sun, 27 Apr 2014 19:11:15 +0200
From: Dominique van den Broeck <domdevlin@...e.fr>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
Dominique van den Broeck <domdevlin@...e.fr>
Subject: [PATCH 1/2] staging/rtl8192e: Erroneous return codes (types and values)
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@...e.fr>
---
I submit this patch as a result for Task #16 of the Eudyptula Challenge.
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index c01abc2..a6f2b2b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -3030,7 +3030,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__);
@@ -3040,7 +3040,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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists