From df088e8b9ddab728985b33cc928b51b9259e4f75 Mon Sep 17 00:00:00 2001 From: Don Fry Date: Fri, 14 Oct 2011 12:54:46 -0700 Subject: [PATCH] --- yaml --- r: 277599 b: refs/heads/master c: fa06ec7944897e0b9d10097e8d8b140357af1845 h: refs/heads/master i: 277597: 80957adb82b05b504e8a5cc2837c0fcb5a9ccf74 277595: 3858cfe0a3e221d4f20f6fde740cf39dde7b6e2c 277591: 9eeac57ba41b53b9f20d0b67470a1fd4093bf027 277583: dd176060ff17bbcfcbd435251c24b27b07d4dd44 277567: 214ca8ed9aefb048068834a6e8bc95971991e269 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-agn.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index aa72d9bd085f..d073ab408c9f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8c3d11617d61c0b69e029fd4087370bc8cb2218d +refs/heads/master: fa06ec7944897e0b9d10097e8d8b140357af1845 diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c index 47dbcca56431..9d463cf40380 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -3178,7 +3178,7 @@ static int iwl_set_hw_params(struct iwl_priv *priv) } /* This function both allocates and initializes hw and priv. */ -static struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg) +static struct ieee80211_hw *iwl_alloc_all(void) { struct iwl_priv *priv; /* mac80211 allocates memory for this device instance, including @@ -3186,11 +3186,8 @@ static struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg) struct ieee80211_hw *hw; hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwlagn_hw_ops); - if (hw == NULL) { - pr_err("%s: Can not allocate network device\n", - cfg->name); + if (!hw) goto out; - } priv = hw->priv; priv->hw = hw; @@ -3211,8 +3208,9 @@ int iwl_probe(struct iwl_bus *bus, const struct iwl_trans_ops *trans_ops, /************************ * 1. Allocating HW data ************************/ - hw = iwl_alloc_all(cfg); + hw = iwl_alloc_all(); if (!hw) { + pr_err("%s: Cannot allocate network device\n", cfg->name); err = -ENOMEM; goto out; }