Skip to content

Commit

Permalink
b43: Don't use struct wldev after detach.
Browse files Browse the repository at this point in the history
Don't use struct wldev after detach. This fixes an oops on access.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Michael Buesch authored and John W. Linville committed Oct 7, 2009
1 parent a4d63a9 commit 727c988
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/b43/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ void b43_leds_register(struct b43_wldev *dev)
}
}

void b43_leds_unregister(struct b43_wldev *dev)
void b43_leds_unregister(struct b43_wl *wl)
{
struct b43_leds *leds = &dev->wl->leds;
struct b43_leds *leds = &wl->leds;

b43_unregister_led(&leds->led_tx);
b43_unregister_led(&leds->led_rx);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/b43/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum b43_led_behaviour {
};

void b43_leds_register(struct b43_wldev *dev);
void b43_leds_unregister(struct b43_wldev *dev);
void b43_leds_unregister(struct b43_wl *wl);
void b43_leds_init(struct b43_wldev *dev);
void b43_leds_exit(struct b43_wldev *dev);
void b43_leds_stop(struct b43_wldev *dev);
Expand All @@ -76,7 +76,7 @@ struct b43_leds {
static inline void b43_leds_register(struct b43_wldev *dev)
{
}
static inline void b43_leds_unregister(struct b43_wldev *dev)
static inline void b43_leds_unregister(struct b43_wl *wl)
{
}
static inline void b43_leds_init(struct b43_wldev *dev)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4997,7 +4997,7 @@ static void b43_remove(struct ssb_device *dev)

if (list_empty(&wl->devlist)) {
b43_rng_exit(wl);
b43_leds_unregister(wldev);
b43_leds_unregister(wl);
/* Last core on the chip unregistered.
* We can destroy common struct b43_wl.
*/
Expand Down

0 comments on commit 727c988

Please sign in to comment.