On Friday 09 March 2007 16:46, Michael Buesch wrote: > On Friday 09 March 2007 16:14, Ivo van Doorn wrote: > > At the moment it is possible to call ieee80211_unregister_hw() > > for an unregistered hw structure. This will cause a big panic. > > This patch will add a check to check if IEEE80211_DEV_REGISTERED > > has been set before attempting to unregister hw. > > For which reason would a driver call unregister, but not register before? Well it occurred in rt2x00 during errors during initialization, instead of using goto's to step by step free all allocated memory and unregistration the main free_dev() was called. And there isn't a way for the driver to check if the hw has been registered or not without creating new flags for it. But since mac80211 already is using such a flag internally, it would sound like more sense to make the check in there. > I smell design problems in the driver ;) True, there are different approaches to take care of this inside the driver, but I think this check is sane enough as well. ;) Ivo - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html