ipw2200: fix oops on missing firmware
For non-monitor interfaces, the syntax for alloc_ieee80211/free_80211 is wrong. Because alloc_ieee80211 only creates (wiphy_new) a wiphy, but free_80211() does wiphy_unregister() also. This is only correct when the later wiphy_register() is called successfully, which apparently is not the case for your fw doesn't exist one. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -11821,6 +11821,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
|
||||
if (err) {
|
||||
IPW_ERROR("Failed to register promiscuous network "
|
||||
"device (error %d).\n", err);
|
||||
unregister_ieee80211(priv->ieee);
|
||||
unregister_netdev(priv->net_dev);
|
||||
goto out_remove_sysfs;
|
||||
}
|
||||
@@ -11871,6 +11872,7 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev)
|
||||
|
||||
mutex_unlock(&priv->mutex);
|
||||
|
||||
unregister_ieee80211(priv->ieee);
|
||||
unregister_netdev(priv->net_dev);
|
||||
|
||||
if (priv->rxq) {
|
||||
|
Reference in New Issue
Block a user