goto failed;
        link->priv = dev;
 
+       iface = netdev_priv(dev);
+       local = iface->local;
+       local->hw_priv = hw_priv;
+       hw_priv->link = link;
+       strcpy(hw_priv->node.dev_name, dev->name);
+       link->dev = &hw_priv->node;
+
        /*
         * Allocate an interrupt line.  Note that this does not assign a
         * handler to the interrupt, unless the 'Handler' member of the
        link->state |= DEV_CONFIG;
        link->state &= ~DEV_CONFIG_PENDING;
 
-       iface = netdev_priv(dev);
-       local = iface->local;
-       local->hw_priv = hw_priv;
-       hw_priv->link = link;
-       strcpy(hw_priv->node.dev_name, dev->name);
-       link->dev = &hw_priv->node;
-
        local->shutdown = 0;
 
        sandisk_enable_wireless(dev);