mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-19 19:14:01 +08:00
brcmsmac: fix brcms_c_country_valid()
ccode is not NUL terminated. Presumably insisting on a terminator makes brcms_c_country_valid() return false when it's not intended. ccode[2] is sprom->leddc_on_time. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
b90af3b8c6
commit
68eed6ee4c
@ -183,8 +183,7 @@ static bool brcms_c_country_valid(const char *ccode)
|
||||
* chars.
|
||||
*/
|
||||
if (!((0x80 & ccode[0]) == 0 && ccode[0] >= 0x41 && ccode[0] <= 0x5A &&
|
||||
(0x80 & ccode[1]) == 0 && ccode[1] >= 0x41 && ccode[1] <= 0x5A &&
|
||||
ccode[2] == '\0'))
|
||||
(0x80 & ccode[1]) == 0 && ccode[1] >= 0x41 && ccode[1] <= 0x5A))
|
||||
return false;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user