|
@@ -241,6 +241,10 @@ static int skeleton_probe ( struct pci_device *pci ) {
|
241
|
241
|
|
242
|
242
|
/* Map registers */
|
243
|
243
|
skel->regs = ioremap ( pci->membase, SKELETON_BAR_SIZE );
|
|
244
|
+ if ( ! skel->regs ) {
|
|
245
|
+ rc = -ENODEV;
|
|
246
|
+ goto err_ioremap;
|
|
247
|
+ }
|
244
|
248
|
|
245
|
249
|
/* Reset the NIC */
|
246
|
250
|
if ( ( rc = skeleton_reset ( skel ) ) != 0 )
|
|
@@ -269,6 +273,7 @@ static int skeleton_probe ( struct pci_device *pci ) {
|
269
|
273
|
skeleton_reset ( skel );
|
270
|
274
|
err_reset:
|
271
|
275
|
iounmap ( skel->regs );
|
|
276
|
+ err_ioremap:
|
272
|
277
|
netdev_nullify ( netdev );
|
273
|
278
|
netdev_put ( netdev );
|
274
|
279
|
err_alloc:
|