From: Martin Kaiser Date: Thu, 11 Nov 2021 21:26:44 +0000 (+0100) Subject: staging: r8188eu: simplify two boolean assignments X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=74b1dc3630636ef87b9d74b913e686769a8643cd;p=linux.git staging: r8188eu: simplify two boolean assignments There's no need to use the ? operator and to set true and false explicitly. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20211111212644.9011-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 004622f7a85fb..2a1620fe05560 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -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"));