All of lore.kernel.org
 help / color / mirror / Atom feed
* Coverity: rtw_ieee802_11_parse_elems(): Incorrect expression
@ 2021-04-08 23:40 coverity-bot
  0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2021-04-08 23:40 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Greg Kroah-Hartman, Gustavo A. R. Silva, linux-next

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20210408 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Sat Apr 8 12:52:39 2017 +0200
    554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")

Coverity reported the following:

*** CID 1503715:  Incorrect expression  (IDENTICAL_BRANCHES)
/drivers/staging/rtl8723bs/core/rtw_ieee80211.c: 1003 in rtw_ieee802_11_parse_elems()
997     		case WLAN_EID_OPMODE_NOTIF:
998     			elems->vht_op_mode_notify = pos;
999     			elems->vht_op_mode_notify_len = elen;
1000     			break;
1001     		default:
1002     			unknown++;
vvv     CID 1503715:  Incorrect expression  (IDENTICAL_BRANCHES)
vvv     The same code is executed when the condition "!show_errors" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
1003     			if (!show_errors)
1004     				break;
1005     			break;
1006     		}
1007
1008     		left -= elen;

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1503715 ("Incorrect expression")
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-08 23:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 23:40 Coverity: rtw_ieee802_11_parse_elems(): Incorrect expression coverity-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.