We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76a4c8b commit 9a36e2dCopy full SHA for 9a36e2d
drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -981,6 +981,9 @@ int octep_device_setup(struct octep_device *oct)
981
oct->mmio[i].hw_addr =
982
ioremap(pci_resource_start(oct->pdev, i * 2),
983
pci_resource_len(oct->pdev, i * 2));
984
+ if (!oct->mmio[i].hw_addr)
985
+ goto unmap_prev;
986
+
987
oct->mmio[i].mapped = 1;
988
}
989
@@ -1015,7 +1018,9 @@ int octep_device_setup(struct octep_device *oct)
1015
1018
return 0;
1016
1019
1017
1020
unsupported_dev:
- for (i = 0; i < OCTEP_MMIO_REGIONS; i++)
1021
+ i = OCTEP_MMIO_REGIONS;
1022
+unmap_prev:
1023
+ while (i--)
1024
iounmap(oct->mmio[i].hw_addr);
1025
1026
kfree(oct->conf);
0 commit comments