staging: r8188eu: simplify two boolean assignments
authorMartin Kaiser <martin@kaiser.cx>
Thu, 11 Nov 2021 21:26:44 +0000 (22:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Nov 2021 09:02:04 +0000 (10:02 +0100)
There's no need to use the ? operator and to set true and
false explicitly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/usb_halinit.c

index 004622f7a85fbc7a9806d5d5e3e48a0778f2cce0..2a1620fe055603ef35ceedae7ffd6bbd303f056d 100644 (file)
@@ -1028,8 +1028,8 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
 
        /* check system boot selection */
        eeValue = rtw_read8(Adapter, REG_9346CR);
-       eeprom->EepromOrEfuse           = (eeValue & BOOT_FROM_EEPROM) ? true : false;
-       eeprom->bautoload_fail_flag     = (eeValue & EEPROM_EN) ? false : true;
+       eeprom->EepromOrEfuse           = (eeValue & BOOT_FROM_EEPROM);
+       eeprom->bautoload_fail_flag     = !(eeValue & EEPROM_EN);
 
        DBG_88E("Boot from %s, Autoload %s !\n", (eeprom->EepromOrEfuse ? "EEPROM" : "EFUSE"),
                (eeprom->bautoload_fail_flag ? "Fail" : "OK"));