mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 00:12:19 +03:00
[intel] Check for ioremap() failures
Debugged-by: Anton D. Kachalov <mouse@yandex-team.ru> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -819,6 +819,10 @@ static int intel_probe ( struct pci_device *pci ) {
|
||||
|
||||
/* Map registers */
|
||||
intel->regs = ioremap ( pci->membase, INTEL_BAR_SIZE );
|
||||
if ( ! intel->regs ) {
|
||||
rc = -ENODEV;
|
||||
goto err_ioremap;
|
||||
}
|
||||
|
||||
/* Reset the NIC */
|
||||
if ( ( rc = intel_reset ( intel ) ) != 0 )
|
||||
@@ -843,6 +847,7 @@ static int intel_probe ( struct pci_device *pci ) {
|
||||
intel_reset ( intel );
|
||||
err_reset:
|
||||
iounmap ( intel->regs );
|
||||
err_ioremap:
|
||||
netdev_nullify ( netdev );
|
||||
netdev_put ( netdev );
|
||||
err_alloc:
|
||||
|
||||
Reference in New Issue
Block a user