Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310097
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() |
| Date | 2016-01-15 14:20 +0100 |
| Message-ID | <qRcsh-6zK-7@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <qMvFg-RW-3@gated-at.bofh.it> <qRciB-6vV-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Jan 2016 13:40:22 +0100
Replace explicit initialisation for two local variables at the beginning
by assignments.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/net/wireless/rsi/rsi_91x_pkt.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c
index 4322df1..2c18c01 100644
--- a/drivers/net/wireless/rsi/rsi_91x_pkt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c
@@ -26,12 +26,12 @@
*/
int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
{
- struct rsi_hw *adapter = common->priv;
+ struct rsi_hw *adapter;
struct ieee80211_hdr *tmp_hdr;
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);
@@ -97,7 +99,7 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
frame_desc[7] = cpu_to_le16(((tx_params->tid & 0xf) << 4) |
(skb->priority & 0xf) |
(tx_params->sta_id << 8));
-
+ adapter = common->priv;
status = adapter->host_intf_write_pkt(common->priv,
skb->data,
skb->len);
--
2.6.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] net-rsi: Fine-tuning for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-02 15:50 +0100
[PATCH v3 0/3] net-rsi: Fine-tuning for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:10 +0100
[PATCH v3 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:10 +0100
[PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:20 +0100
Re: [PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() Dan Carpenter <dan.carpenter@oracle.com> - 2016-01-19 13:50 +0100
[PATCH v3 2/3] rsi: Delete unnecessary variable initialisations in rsi_send_data_pkt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:20 +0100
csiph-web