From: Colin King <colin.king@canonical.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans de Goede <hdegoede@redhat.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
devel@driverdev.osuosl.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8723bs: clean up identical code on an if statement
Date: Thu, 13 Apr 2017 16:46:36 +0100 [thread overview]
Message-ID: <20170413154636.11713-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
The two different paths for an if statement are identical and hence
we can just replace it with the single statement.
Detected by CoverityScan, CID#1428443 ("Identical code for
different branches")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 53755e5b97a6..9e355734f0c0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1093,11 +1093,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
rtw_init_bcmc_stainfo(adapter);
}
- if (lock_scanned_queue) {
- find_network(adapter);
- } else {
- find_network(adapter);
- }
+ find_network(adapter);
if (lock_scanned_queue)
adapter->securitypriv.key_mask = 0;
--
2.11.0
next reply other threads:[~2017-04-13 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 15:46 Colin King [this message]
2017-04-14 12:15 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170413154636.11713-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®