Staging: rtl8712: rtl8712_cmd: Fixed a warning.
authorRakhi Sharma <rakhish1994@gmail.com>
Fri, 29 Jan 2016 07:07:06 +0000 (12:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 03:53:04 +0000 (19:53 -0800)
Warning:Comparisons should place the constant on the right side of the test
Fixed by placing the comparisions constant on right side of the test.

Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_cmd.c

index 9b9160947943de687c8ae99ff5b7c08adcd555f1..86a9089b62fd5e74ee5c05ad61f65427ea953413 100644 (file)
@@ -293,7 +293,7 @@ u8 r8712_fw_cmd(struct _adapter *pAdapter, u32 cmd)
 
        r8712_write32(pAdapter, IOCMD_CTRL_REG, cmd);
        msleep(100);
-       while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) &&
+       while ((r8712_read32(pAdapter, IOCMD_CTRL_REG != 0)) &&
               (pollingcnts > 0)) {
                pollingcnts--;
                msleep(20);