From 1b55a136d16bb455368600dfaa5ddea393de789c Mon Sep 17 00:00:00 2001
From: Luca Coelho <luciano.coelho@intel.com>
Date: Wed, 5 Apr 2017 09:42:18 +0300
Subject: [PATCH 048/146] iwlwifi: remove unnecessary code in
iwl_trans_alloc_tx_cmd
Git-commit: 0ae0bb3f409d48251a9a1730a514b3521d8f6042
Patch-mainline: v4.13-rc1
References: FATE#322675
When we removed dev_cmd_headroom, the check for dev_cmd_ptr == NULL
became unnecessary, since we just return dev_cmd_ptr anyway. Cleanup
the function to avoid useless code.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index e965285f84f1..a150da3c824b 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -908,13 +908,7 @@ iwl_trans_dump_data(struct iwl_trans *trans,
static inline struct iwl_device_cmd *
iwl_trans_alloc_tx_cmd(struct iwl_trans *trans)
{
- struct iwl_device_cmd *dev_cmd_ptr =
- kmem_cache_alloc(trans->dev_cmd_pool, GFP_ATOMIC);
-
- if (unlikely(dev_cmd_ptr == NULL))
- return NULL;
-
- return dev_cmd_ptr;
+ return kmem_cache_alloc(trans->dev_cmd_pool, GFP_ATOMIC);
}
int iwl_trans_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd);
--
2.12.3