Commit 0c9f7222 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: rtl8188eu: remove exit label from rtw_alloc_stainfo

Remove exit label from rtw_alloc_stainfo and simply return NULL
instead of goto exit.
Suggested-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20191027130604.68379-1-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cce43045
...@@ -181,7 +181,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) ...@@ -181,7 +181,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
struct sta_info, list); struct sta_info, list);
if (!psta) { if (!psta) {
spin_unlock_bh(&pfree_sta_queue->lock); spin_unlock_bh(&pfree_sta_queue->lock);
goto exit; return NULL;
} }
list_del_init(&psta->list); list_del_init(&psta->list);
...@@ -194,8 +194,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) ...@@ -194,8 +194,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
if (index >= NUM_STA) { if (index >= NUM_STA) {
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
("ERROR => %s: index >= NUM_STA", __func__)); ("ERROR => %s: index >= NUM_STA", __func__));
psta = NULL; return NULL;
goto exit;
} }
phash_list = &pstapriv->sta_hash[index]; phash_list = &pstapriv->sta_hash[index];
...@@ -246,7 +245,6 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) ...@@ -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 */ /* init for the sequence number of received management frame */
psta->RxMgmtFrameSeqNum = 0xffff; psta->RxMgmtFrameSeqNum = 0xffff;
exit:
return psta; return psta;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment