mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 06:22:59 +03:00
[arbel] Add missing iounmap()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -3000,6 +3000,16 @@ static int arbel_probe ( struct pci_device *pci ) {
|
|||||||
pci_set_drvdata ( pci, arbel );
|
pci_set_drvdata ( pci, arbel );
|
||||||
arbel->pci = pci;
|
arbel->pci = pci;
|
||||||
|
|
||||||
|
/* Fix up PCI device */
|
||||||
|
adjust_pci_device ( pci );
|
||||||
|
|
||||||
|
/* Map PCI BARs */
|
||||||
|
arbel->config = ioremap ( pci_bar_start ( pci, ARBEL_PCI_CONFIG_BAR ),
|
||||||
|
ARBEL_PCI_CONFIG_BAR_SIZE );
|
||||||
|
arbel->uar = ioremap ( ( pci_bar_start ( pci, ARBEL_PCI_UAR_BAR ) +
|
||||||
|
ARBEL_PCI_UAR_IDX * ARBEL_PCI_UAR_SIZE ),
|
||||||
|
ARBEL_PCI_UAR_SIZE );
|
||||||
|
|
||||||
/* Allocate Infiniband devices */
|
/* Allocate Infiniband devices */
|
||||||
for ( i = 0 ; i < ARBEL_NUM_PORTS ; i++ ) {
|
for ( i = 0 ; i < ARBEL_NUM_PORTS ; i++ ) {
|
||||||
ibdev = alloc_ibdev ( 0 );
|
ibdev = alloc_ibdev ( 0 );
|
||||||
@@ -3014,16 +3024,6 @@ static int arbel_probe ( struct pci_device *pci ) {
|
|||||||
ib_set_drvdata ( ibdev, arbel );
|
ib_set_drvdata ( ibdev, arbel );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix up PCI device */
|
|
||||||
adjust_pci_device ( pci );
|
|
||||||
|
|
||||||
/* Get PCI BARs */
|
|
||||||
arbel->config = ioremap ( pci_bar_start ( pci, ARBEL_PCI_CONFIG_BAR ),
|
|
||||||
ARBEL_PCI_CONFIG_BAR_SIZE );
|
|
||||||
arbel->uar = ioremap ( ( pci_bar_start ( pci, ARBEL_PCI_UAR_BAR ) +
|
|
||||||
ARBEL_PCI_UAR_IDX * ARBEL_PCI_UAR_SIZE ),
|
|
||||||
ARBEL_PCI_UAR_SIZE );
|
|
||||||
|
|
||||||
/* Reset device */
|
/* Reset device */
|
||||||
arbel_reset ( arbel );
|
arbel_reset ( arbel );
|
||||||
|
|
||||||
@@ -3072,6 +3072,8 @@ static int arbel_probe ( struct pci_device *pci ) {
|
|||||||
err_alloc_ibdev:
|
err_alloc_ibdev:
|
||||||
for ( i-- ; i >= 0 ; i-- )
|
for ( i-- ; i >= 0 ; i-- )
|
||||||
ibdev_put ( arbel->ibdev[i] );
|
ibdev_put ( arbel->ibdev[i] );
|
||||||
|
iounmap ( arbel->uar );
|
||||||
|
iounmap ( arbel->config );
|
||||||
arbel_free ( arbel );
|
arbel_free ( arbel );
|
||||||
err_alloc:
|
err_alloc:
|
||||||
return rc;
|
return rc;
|
||||||
@@ -3090,6 +3092,8 @@ static void arbel_remove ( struct pci_device *pci ) {
|
|||||||
unregister_ibdev ( arbel->ibdev[i] );
|
unregister_ibdev ( arbel->ibdev[i] );
|
||||||
for ( i = ( ARBEL_NUM_PORTS - 1 ) ; i >= 0 ; i-- )
|
for ( i = ( ARBEL_NUM_PORTS - 1 ) ; i >= 0 ; i-- )
|
||||||
ibdev_put ( arbel->ibdev[i] );
|
ibdev_put ( arbel->ibdev[i] );
|
||||||
|
iounmap ( arbel->uar );
|
||||||
|
iounmap ( arbel->config );
|
||||||
arbel_free ( arbel );
|
arbel_free ( arbel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user