|
@@ -1119,6 +1119,10 @@ static int realtek_probe ( struct pci_device *pci ) {
|
1119
|
1119
|
|
1120
|
1120
|
/* Map registers */
|
1121
|
1121
|
rtl->regs = ioremap ( pci->membase, RTL_BAR_SIZE );
|
|
1122
|
+ if ( ! rtl->regs ) {
|
|
1123
|
+ rc = -ENODEV;
|
|
1124
|
+ goto err_ioremap;
|
|
1125
|
+ }
|
1122
|
1126
|
|
1123
|
1127
|
/* Reset the NIC */
|
1124
|
1128
|
if ( ( rc = realtek_reset ( rtl ) ) != 0 )
|
|
@@ -1177,6 +1181,7 @@ static int realtek_probe ( struct pci_device *pci ) {
|
1177
|
1181
|
realtek_reset ( rtl );
|
1178
|
1182
|
err_reset:
|
1179
|
1183
|
iounmap ( rtl->regs );
|
|
1184
|
+ err_ioremap:
|
1180
|
1185
|
netdev_nullify ( netdev );
|
1181
|
1186
|
netdev_put ( netdev );
|
1182
|
1187
|
err_alloc:
|