Commit 37190b26 authored by Markus Elfring's avatar Markus Elfring Committed by Kalle Valo

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
[Deleted controversial bits, rewrote commit message]
Signed-off-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ab2ef1d6
...@@ -31,7 +31,7 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) ...@@ -31,7 +31,7 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
struct skb_info *tx_params; struct skb_info *tx_params;
struct ieee80211_bss_conf *bss; struct ieee80211_bss_conf *bss;
int status = -EINVAL; int status;
u8 ieee80211_size = MIN_802_11_HDR_LEN; u8 ieee80211_size = MIN_802_11_HDR_LEN;
u8 extnd_size; u8 extnd_size;
__le16 *frame_desc; __le16 *frame_desc;
...@@ -41,8 +41,10 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) ...@@ -41,8 +41,10 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
bss = &info->control.vif->bss_conf; bss = &info->control.vif->bss_conf;
tx_params = (struct skb_info *)info->driver_data; tx_params = (struct skb_info *)info->driver_data;
if (!bss->assoc) if (!bss->assoc) {
status = -EINVAL;
goto err; goto err;
}
tmp_hdr = (struct ieee80211_hdr *)&skb->data[0]; tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
seq_num = (le16_to_cpu(tmp_hdr->seq_ctrl) >> 4); seq_num = (le16_to_cpu(tmp_hdr->seq_ctrl) >> 4);
......
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