This bug was caused by the packing of the bcm43xx_dma and bcm43xx_pio
structures into a union.
Signed-off-by: Michael Buesch <mbuesch@freenet.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
 
 void bcm43xx_dma_free(struct bcm43xx_private *bcm)
 {
-       struct bcm43xx_dma *dma = bcm43xx_current_dma(bcm);
+       struct bcm43xx_dma *dma;
+
+       if (bcm43xx_using_pio(bcm))
+               return;
+       dma = bcm43xx_current_dma(bcm);
 
        bcm43xx_destroy_dmaring(dma->rx_ring1);
        dma->rx_ring1 = NULL;
 
 
 void bcm43xx_pio_free(struct bcm43xx_private *bcm)
 {
-       struct bcm43xx_pio *pio = bcm43xx_current_pio(bcm);
+       struct bcm43xx_pio *pio;
+
+       if (!bcm43xx_using_pio(bcm))
+               return;
+       pio = bcm43xx_current_pio(bcm);
 
        bcm43xx_destroy_pioqueue(pio->queue3);
        pio->queue3 = NULL;