diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-06 11:34:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-06 11:34:06 -0400 |
commit | cb4361c1dc29cd870f664c004b1817106fbce0fa (patch) | |
tree | c31533210d738c9074b21b8f31fe0399b39545f0 /drivers/net/wireless/libertas/cfg.c | |
parent | 309361e09ca9e9670dc8664e5d14125bf82078af (diff) | |
parent | fb9e2d887243499b8d28efcf80821c4f6a092395 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
smc91c92_cs: fix the problem of "Unable to find hardware address"
r8169: clean up my printk uglyness
net: Hook up cxgb4 to Kconfig and Makefile
cxgb4: Add main driver file and driver Makefile
cxgb4: Add remaining driver headers and L2T management
cxgb4: Add packet queues and packet DMA code
cxgb4: Add HW and FW support code
cxgb4: Add register, message, and FW definitions
netlabel: Fix several rcu_dereference() calls used without RCU read locks
bonding: fix potential deadlock in bond_uninit()
net: check the length of the socket address passed to connect(2)
stmmac: add documentation for the driver.
stmmac: fix kconfig for crc32 build error
be2net: fix bug in vlan rx path for big endian architecture
be2net: fix flashing on big endian architectures
be2net: fix a bug in flashing the redboot section
bonding: bond_xmit_roundrobin() fix
drivers/net: Add missing unlock
net: gianfar - align BD ring size console messages
net: gianfar - initialize per-queue statistics
...
Diffstat (limited to 'drivers/net/wireless/libertas/cfg.c')
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index e196b84914d..ce7bec402a3 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -173,6 +173,8 @@ int lbs_cfg_register(struct lbs_private *priv) | |||
173 | if (ret < 0) | 173 | if (ret < 0) |
174 | lbs_pr_err("cannot register wiphy device\n"); | 174 | lbs_pr_err("cannot register wiphy device\n"); |
175 | 175 | ||
176 | priv->wiphy_registered = true; | ||
177 | |||
176 | ret = register_netdev(priv->dev); | 178 | ret = register_netdev(priv->dev); |
177 | if (ret) | 179 | if (ret) |
178 | lbs_pr_err("cannot register network device\n"); | 180 | lbs_pr_err("cannot register network device\n"); |
@@ -191,9 +193,11 @@ void lbs_cfg_free(struct lbs_private *priv) | |||
191 | if (!wdev) | 193 | if (!wdev) |
192 | return; | 194 | return; |
193 | 195 | ||
194 | if (wdev->wiphy) { | 196 | if (priv->wiphy_registered) |
195 | wiphy_unregister(wdev->wiphy); | 197 | wiphy_unregister(wdev->wiphy); |
198 | |||
199 | if (wdev->wiphy) | ||
196 | wiphy_free(wdev->wiphy); | 200 | wiphy_free(wdev->wiphy); |
197 | } | 201 | |
198 | kfree(wdev); | 202 | kfree(wdev); |
199 | } | 203 | } |