Skip to contentSkip to conversation

staging: rtl8188eu: || vs && typo

PATCH In review Dan Carpenter 2 participants 2 messages Aug 29, 2013 – Aug 31, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 staging: rtl8188eu: || vs && typo

Obviously it's impossible for ->KeyLength to be both 5 and 13. I assume that && was intended here.

drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +1 -1
index 5fab477..193f641 100644
@@ -743,7 +743,7 @@ _func_enter_;
 
 		/*  Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. */
 		if ((encryptionalgo = _WEP40_ || encryptionalgo = _WEP104_) &&
-		    (key->KeyLength != 5 || key->KeyLength != 13)) {
+		    (key->KeyLength != 5 && key->KeyLength != 13)) {
 			RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
 			ret = _FAIL;
 			goto exit;
Acked-by on v1 2/2
#1 lore raw
Quoted 10 lines · Dan Carpenter

Obviously it's impossible for ->KeyLength to be both 5 and 13. I assume that && was intended here.

drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +0 -0
index 5fab477..193f641 100644

drivers/staging/rtl8188eu/core/rtw_ioctl_set.c _func_enter_; · line 749

Quoted 8 lines
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +1 -1
@@ -743,7 +743,7 @@ _func_enter_;
 
  		/*  Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. */
  		if ((encryptionalgo = _WEP40_ || encryptionalgo = _WEP104_) &&
-		    (key->KeyLength != 5 || key->KeyLength != 13)) {
+		    (key->KeyLength != 5 && key->KeyLength != 13)) {
  			RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
  			ret = _FAIL;
  			goto exit;

Thanks,

Larry