summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-04-13 15:13:46 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 13:54:25 +0200
commitff8d351d71f3261c964ce90d43ce6907e79e5fc4 (patch)
treeaac98e290f327977682bed73625e4db9ed11c81e /drivers/staging/rtl8723bs
parentbaa7a586b5b4195268d53c5a69bbcd7db4ce19f2 (diff)
downloadblackbird-obmc-linux-ff8d351d71f3261c964ce90d43ce6907e79e5fc4.tar.gz
blackbird-obmc-linux-ff8d351d71f3261c964ce90d43ce6907e79e5fc4.zip
staging: rtl8723bs: remove redundant comparisons of unsigned ints with >= 0
The comparison of mode >= 0 is redundant as mode is a u32 and this is always true. Remove this redundant code. Detected with CoverityScan ("Unsigned compared against 0") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs')
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index 51cef55d3f76..fc6b94d59c37 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -1031,7 +1031,7 @@ ssize_t proc_set_ht_enable(struct file *file, const char __user *buffer, size_t
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
sscanf(tmp, "%d ", &mode);
- if (pregpriv && mode >= 0 && mode < 2) {
+ if (pregpriv && mode < 2) {
pregpriv->ht_enable = mode;
printk("ht_enable =%d\n", pregpriv->ht_enable);
}
@@ -1150,7 +1150,7 @@ ssize_t proc_set_rx_ampdu(struct file *file, const char __user *buffer, size_t c
sscanf(tmp, "%d ", &mode);
- if (pregpriv && mode >= 0 && mode < 2) {
+ if (pregpriv && mode < 2) {
pmlmeinfo->bAcceptAddbaReq = mode;
DBG_871X("pmlmeinfo->bAcceptAddbaReq =%d\n", pmlmeinfo->bAcceptAddbaReq);
if (mode == 0) {
@@ -1191,7 +1191,7 @@ ssize_t proc_set_en_fwps(struct file *file, const char __user *buffer, size_t co
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
sscanf(tmp, "%d ", &mode);
- if (pregpriv && mode >= 0 && mode < 2) {
+ if (pregpriv && mode < 2) {
pregpriv->check_fw_ps = mode;
DBG_871X("pregpriv->check_fw_ps =%d\n", pregpriv->check_fw_ps);
}
OpenPOWER on IntegriCloud