diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-12-04 16:16:45 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-12-11 13:15:49 +0200 |
commit | 3f0267f6f76d56285095f88a8908daf8be0fe56b (patch) | |
tree | a4e1f9efed9f761e40c2aef512fad1510b223e3d /drivers/net/wireless | |
parent | 09ad44efe722161bbc26317b6c2a43dfd86f023b (diff) | |
download | op-kernel-dev-3f0267f6f76d56285095f88a8908daf8be0fe56b.zip op-kernel-dev-3f0267f6f76d56285095f88a8908daf8be0fe56b.tar.gz |
iwlegacy: cleanup end of il_send_add_sta()
This code causes a static checker warning because we check for
"if (ret == 0)" but we have already had verified that was true. Clean
it up a little.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index 8871145..e49bad2 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c @@ -1865,14 +1865,14 @@ il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags) cmd.len = il->ops->build_addsta_hcmd(sta, data); ret = il_send_cmd(il, &cmd); - - if (ret || (flags & CMD_ASYNC)) + if (ret) return ret; + if (flags & CMD_ASYNC) + return 0; + + pkt = (struct il_rx_pkt *)cmd.reply_page; + ret = il_process_add_sta_resp(il, sta, pkt, true); - if (ret == 0) { - pkt = (struct il_rx_pkt *)cmd.reply_page; - ret = il_process_add_sta_resp(il, sta, pkt, true); - } il_free_pages(il, cmd.reply_page); return ret; |