|
@@ -603,6 +603,10 @@ static int myson_probe ( struct pci_device *pci ) {
|
603
|
603
|
|
604
|
604
|
/* Map registers */
|
605
|
605
|
myson->regs = ioremap ( pci->membase, MYSON_BAR_SIZE );
|
|
606
|
+ if ( ! myson->regs ) {
|
|
607
|
+ rc = -ENODEV;
|
|
608
|
+ goto err_ioremap;
|
|
609
|
+ }
|
606
|
610
|
|
607
|
611
|
/* Reset the NIC */
|
608
|
612
|
if ( ( rc = myson_reset ( myson ) ) != 0 )
|
|
@@ -627,6 +631,7 @@ static int myson_probe ( struct pci_device *pci ) {
|
627
|
631
|
myson_reset ( myson );
|
628
|
632
|
err_reset:
|
629
|
633
|
iounmap ( myson->regs );
|
|
634
|
+ err_ioremap:
|
630
|
635
|
netdev_nullify ( netdev );
|
631
|
636
|
netdev_put ( netdev );
|
632
|
637
|
err_alloc:
|