diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-03-18 02:27:31 (GMT) |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-04-07 16:37:48 (GMT) |
commit | 37190b2694911552c09119e2b23e65049bf47a1e (patch) | |
tree | 026ce476294cdbcd4e97f3f7d08a3772fc096ba3 /drivers/net/wireless | |
parent | ab2ef1d68f62d9e2ec6e494668f288fc000fe886 (diff) | |
download | linux-37190b2694911552c09119e2b23e65049bf47a1e.tar.xz |
rsi: Move variable initialisation into error code
In rsi_send_data_pkt(), it's a little more logical to assign 'status' in
the actual error handling code as opposed to at the top of the functon.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
[Deleted controversial bits, rewrote commit message]
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_pkt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c index 4322df1..a0b31c0 100644 --- a/drivers/net/wireless/rsi/rsi_91x_pkt.c +++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c @@ -31,7 +31,7 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) struct ieee80211_tx_info *info; struct skb_info *tx_params; struct ieee80211_bss_conf *bss; - int status = -EINVAL; + int status; u8 ieee80211_size = MIN_802_11_HDR_LEN; u8 extnd_size; __le16 *frame_desc; @@ -41,8 +41,10 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) bss = &info->control.vif->bss_conf; tx_params = (struct skb_info *)info->driver_data; - if (!bss->assoc) + if (!bss->assoc) { + status = -EINVAL; goto err; + } tmp_hdr = (struct ieee80211_hdr *)&skb->data[0]; seq_num = (le16_to_cpu(tmp_hdr->seq_ctrl) >> 4); |