Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300625
b: refs/heads/master
c: a9b9361
h: refs/heads/master
i:
  300623: 564cf3a
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Apr 9, 2012
1 parent 0e85654 commit 5da2ff3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52a3f20c09559465f821b54838decb397054e7de
refs/heads/master: a9b9361dd5ef6c39703f2f0c8c18aa2e1f133fc5
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/p54/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,14 @@ int p54_register_common(struct ieee80211_hw *dev, struct device *pdev)
dev_err(pdev, "Cannot register device (%d).\n", err);
return err;
}
priv->registered = true;

#ifdef CONFIG_P54_LEDS
err = p54_init_leds(priv);
if (err)
if (err) {
p54_unregister_common(dev);
return err;
}
#endif /* CONFIG_P54_LEDS */

dev_info(pdev, "is registered as '%s'\n", wiphy_name(dev->wiphy));
Expand Down Expand Up @@ -840,7 +843,11 @@ void p54_unregister_common(struct ieee80211_hw *dev)
p54_unregister_leds(priv);
#endif /* CONFIG_P54_LEDS */

ieee80211_unregister_hw(dev);
if (priv->registered) {
priv->registered = false;
ieee80211_unregister_hw(dev);
}

mutex_destroy(&priv->conf_mutex);
mutex_destroy(&priv->eeprom_mutex);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/p54/p54.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ struct p54_common {
struct sk_buff_head tx_pending;
struct sk_buff_head tx_queue;
struct mutex conf_mutex;
bool registered;

/* memory management (as seen by the firmware) */
u32 rx_start;
Expand Down

0 comments on commit 5da2ff3

Please sign in to comment.