aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@kernel.org>2010-07-05 17:44:20 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-07 17:48:00 -0400
commitdfe1e8eddcd73fc58124933c14c2efe93fab0b8f (patch)
tree65dc2eaa9097c2dbfc4225071c00c2949a7a85ce /drivers/net
parent17762060c25590bfddd68cc1131f28ec720f405f (diff)
ll_temac: Fix missing iounmaps
Fix missing iounmaps. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ll_temac_main.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index 52dcc8495647..6474c4973d3a 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -964,7 +964,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
964 np = of_parse_phandle(op->dev.of_node, "llink-connected", 0); 964 np = of_parse_phandle(op->dev.of_node, "llink-connected", 0);
965 if (!np) { 965 if (!np) {
966 dev_err(&op->dev, "could not find DMA node\n"); 966 dev_err(&op->dev, "could not find DMA node\n");
967 goto nodev; 967 goto err_iounmap;
968 } 968 }
969 969
970 /* Setup the DMA register accesses, could be DCR or memory mapped */ 970 /* Setup the DMA register accesses, could be DCR or memory mapped */
@@ -978,7 +978,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
978 dev_dbg(&op->dev, "MEM base: %p\n", lp->sdma_regs); 978 dev_dbg(&op->dev, "MEM base: %p\n", lp->sdma_regs);
979 } else { 979 } else {
980 dev_err(&op->dev, "unable to map DMA registers\n"); 980 dev_err(&op->dev, "unable to map DMA registers\n");
981 goto nodev; 981 goto err_iounmap;
982 } 982 }
983 } 983 }
984 984
@@ -987,7 +987,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
987 if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) { 987 if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) {
988 dev_err(&op->dev, "could not determine irqs\n"); 988 dev_err(&op->dev, "could not determine irqs\n");
989 rc = -ENOMEM; 989 rc = -ENOMEM;
990 goto nodev; 990 goto err_iounmap_2;
991 } 991 }
992 992
993 of_node_put(np); /* Finished with the DMA node; drop the reference */ 993 of_node_put(np); /* Finished with the DMA node; drop the reference */
@@ -997,7 +997,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
997 if ((!addr) || (size != 6)) { 997 if ((!addr) || (size != 6)) {
998 dev_err(&op->dev, "could not find MAC address\n"); 998 dev_err(&op->dev, "could not find MAC address\n");
999 rc = -ENODEV; 999 rc = -ENODEV;
1000 goto nodev; 1000 goto err_iounmap_2;
1001 } 1001 }
1002 temac_set_mac_address(ndev, (void *)addr); 1002 temac_set_mac_address(ndev, (void *)addr);
1003 1003
@@ -1013,7 +1013,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
1013 rc = sysfs_create_group(&lp->dev->kobj, &temac_attr_group); 1013 rc = sysfs_create_group(&lp->dev->kobj, &temac_attr_group);
1014 if (rc) { 1014 if (rc) {
1015 dev_err(lp->dev, "Error creating sysfs files\n"); 1015 dev_err(lp->dev, "Error creating sysfs files\n");
1016 goto nodev; 1016 goto err_iounmap_2;
1017 } 1017 }
1018 1018
1019 rc = register_netdev(lp->ndev); 1019 rc = register_netdev(lp->ndev);
@@ -1026,6 +1026,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
1026 1026
1027 err_register_ndev: 1027 err_register_ndev:
1028 sysfs_remove_group(&lp->dev->kobj, &temac_attr_group); 1028 sysfs_remove_group(&lp->dev->kobj, &temac_attr_group);
1029 err_iounmap_2:
1030 if (lp->sdma_regs)
1031 iounmap(lp->sdma_regs);
1032 err_iounmap:
1033 iounmap(lp->regs);
1029 nodev: 1034 nodev:
1030 free_netdev(ndev); 1035 free_netdev(ndev);
1031 ndev = NULL; 1036 ndev = NULL;
@@ -1044,6 +1049,9 @@ static int __devexit temac_of_remove(struct of_device *op)
1044 of_node_put(lp->phy_node); 1049 of_node_put(lp->phy_node);
1045 lp->phy_node = NULL; 1050 lp->phy_node = NULL;
1046 dev_set_drvdata(&op->dev, NULL); 1051 dev_set_drvdata(&op->dev, NULL);
1052 iounmap(lp->regs);
1053 if (lp->sdma_regs)
1054 iounmap(lp->sdma_regs);
1047 free_netdev(ndev); 1055 free_netdev(ndev);
1048 return 0; 1056 return 0;
1049} 1057}