Browse Source

ibmvnic: Unmap ibmvnic_statistics structure

This structure was mapped but never subsequently unmapped.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Falcon 8 years ago
parent
commit
b7f193da17
1 changed files with 3 additions and 0 deletions
  1. 3 0
      drivers/net/ethernet/ibm/ibmvnic.c

+ 3 - 0
drivers/net/ethernet/ibm/ibmvnic.c

@@ -3844,6 +3844,9 @@ static int ibmvnic_remove(struct vio_dev *dev)
 	if (adapter->debugfs_dir && !IS_ERR(adapter->debugfs_dir))
 	if (adapter->debugfs_dir && !IS_ERR(adapter->debugfs_dir))
 		debugfs_remove_recursive(adapter->debugfs_dir);
 		debugfs_remove_recursive(adapter->debugfs_dir);
 
 
+	dma_unmap_single(&dev->dev, adapter->stats_token,
+			 sizeof(struct ibmvnic_statistics), DMA_FROM_DEVICE);
+
 	if (adapter->ras_comps)
 	if (adapter->ras_comps)
 		dma_free_coherent(&dev->dev,
 		dma_free_coherent(&dev->dev,
 				  adapter->ras_comp_num *
 				  adapter->ras_comp_num *