mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-08 10:26:42 +07:00
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>
This commit is contained in:
parent
baa7a586b5
commit
ff8d351d71
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user