|
@@ -854,6 +854,10 @@ static int natsemi_probe ( struct pci_device *pci ) {
|
854
|
854
|
|
855
|
855
|
/* Map registers */
|
856
|
856
|
natsemi->regs = ioremap ( pci->membase, NATSEMI_BAR_SIZE );
|
|
857
|
+ if ( ! natsemi->regs ) {
|
|
858
|
+ rc = -ENODEV;
|
|
859
|
+ goto err_ioremap;
|
|
860
|
+ }
|
857
|
861
|
|
858
|
862
|
/* Reset the NIC */
|
859
|
863
|
if ( ( rc = natsemi_reset ( natsemi ) ) != 0 )
|
|
@@ -881,6 +885,7 @@ static int natsemi_probe ( struct pci_device *pci ) {
|
881
|
885
|
natsemi_reset ( natsemi );
|
882
|
886
|
err_reset:
|
883
|
887
|
iounmap ( natsemi->regs );
|
|
888
|
+ err_ioremap:
|
884
|
889
|
netdev_nullify ( netdev );
|
885
|
890
|
netdev_put ( netdev );
|
886
|
891
|
err_alloc:
|