Skip to content

Commit 937ec9f

Browse files
zx2c4gregkh
authored andcommitted
staging: rtl8192e: remove bogus ssid character sign test
This error triggers on some architectures with unsigned `char` types: drivers/staging/rtl8192e/rtllib_softmac_wx.c:459 rtllib_wx_set_essid() warn: impossible condition '(extra[i] < 0) => (0-255 < 0)' But actually, the entire test is bogus, as ssids don't have any sign validity rules like that. So just remove this check look all together. Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Signed-off-by: Jason A. Donenfeld <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9abf231 commit 937ec9f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/staging/rtl8192e/rtllib_softmac_wx.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
439439
union iwreq_data *wrqu, char *extra)
440440
{
441441

442-
int ret = 0, len, i;
442+
int ret = 0, len;
443443
short proto_started;
444444
unsigned long flags;
445445

@@ -455,13 +455,6 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
455455
goto out;
456456
}
457457

458-
for (i = 0; i < len; i++) {
459-
if (extra[i] < 0) {
460-
ret = -1;
461-
goto out;
462-
}
463-
}
464-
465458
if (proto_started)
466459
rtllib_stop_protocol(ieee, true);
467460

0 commit comments

Comments
 (0)