Linux-Next Archive on
 help / color / 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


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:

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     		}
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 <>
Addresses-Coverity-ID: 1503715 ("Incorrect expression")
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")

Thanks for your attention!


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

only message in thread, back to index

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

Linux-Next Archive on

Archives are clonable:
	git clone --mirror linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ \
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone