From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>,
Joe Perches <joe@perches.com>
Subject: [PATCH 1/4] staging: rtl8188eu: remove exit label from rtw_alloc_stainfo
Date: Sun, 27 Oct 2019 14:06:01 +0100 [thread overview]
Message-ID: <20191027130604.68379-1-straube.linux@gmail.com> (raw)
Remove exit label from rtw_alloc_stainfo and simply return NULL
instead of goto exit.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
index 776931b8bf72..65a824b4dfe0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
@@ -181,7 +181,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
struct sta_info, list);
if (!psta) {
spin_unlock_bh(&pfree_sta_queue->lock);
- goto exit;
+ return NULL;
}
list_del_init(&psta->list);
@@ -194,8 +194,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
if (index >= NUM_STA) {
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
("ERROR => %s: index >= NUM_STA", __func__));
- psta = NULL;
- goto exit;
+ return NULL;
}
phash_list = &pstapriv->sta_hash[index];
@@ -246,7 +245,6 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
/* init for the sequence number of received management frame */
psta->RxMgmtFrameSeqNum = 0xffff;
-exit:
return psta;
}
--
2.23.0
next reply other threads:[~2019-10-27 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-27 13:06 Michael Straube [this message]
2019-10-27 13:06 ` [PATCH 2/4] staging: rtl8188eu: reduce indentation level in _rtw_free_sta_priv Michael Straube
2019-10-27 13:06 ` [PATCH 3/4] staging: rtl8188eu: remove return variable from rtw_init_bcmc_stainfo Michael Straube
2019-10-27 13:06 ` [PATCH 4/4] staging: rtl8188eu: replace tabs with spaces - style Michael Straube
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=20191027130604.68379-1-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--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;
as well as URLs for NNTP newsgroup(s).