]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8723bs: core: Fix a comparison warning.
authorVatsala Narang <vatsalanarang@gmail.com>
Fri, 29 Mar 2019 22:48:25 +0000 (04:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Mar 2019 08:28:32 +0000 (09:28 +0100)
Move the constant to the right side of comparison to get rid of
checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_debug.c

index a3c8a712bdc22f5cea6b829d5fa5a06b3578c85a..0de1e12a676e05c1b382817d4d80e158b8988636 100644 (file)
@@ -1395,16 +1395,16 @@ ssize_t proc_set_btcoex_dbg(struct file *file, const char __user *buffer, size_t
        }
 
        num = sscanf(tmp, "%x %x", module, module+1);
-       if (1 == num) {
-               if (0 == module[0])
+       if (num == 1) {
+               if (module[0] == 0)
                        memset(module, 0, sizeof(module));
                else
                        memset(module, 0xFF, sizeof(module));
-       } else if (2 != num) {
+       } else if (num != 2) {
                DBG_871X(FUNC_ADPT_FMT ": input(\"%s\") format incorrect!\n",
                        FUNC_ADPT_ARG(padapter), tmp);
 
-               if (0 == num)
+               if (num == 0)
                        return -EFAULT;
        }