diff --git a/drivers/staging/agnx/pci.c b/drivers/staging/agnx/pci.c index 854630cb527eac8b6480293fcd3792c905548c73..131df9f6c68dd3a0b60bb5ced83efdf76b9bc376 100644 --- a/drivers/staging/agnx/pci.c +++ b/drivers/staging/agnx/pci.c @@ -434,11 +434,12 @@ static struct ieee80211_ops agnx_ops = { static void __devexit agnx_pci_remove(struct pci_dev *pdev) { struct ieee80211_hw *dev = pci_get_drvdata(pdev); - struct agnx_priv *priv = dev->priv; + struct agnx_priv *priv; AGNX_TRACE; if (!dev) return; + priv = dev->priv; ieee80211_unregister_hw(dev); pci_iounmap(pdev, priv->ctl); pci_iounmap(pdev, priv->data);