Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122785
b: refs/heads/master
c: 3e73fc9
h: refs/heads/master
i:
  122783: 41d207e
v: v3
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Dec 19, 2008
1 parent a00df71 commit 89b0220
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba574696a34eb518979e742b35ccd30dec284583
refs/heads/master: 3e73fc9a12679a546284d597c1f19165792d0b83
15 changes: 12 additions & 3 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,10 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
while (!list_empty(&ugeth->ind_hash_q))
put_enet_addr_container(ENET_ADDR_CONT_ENTRY
(dequeue(&ugeth->ind_hash_q)));

if (ugeth->ug_regs) {
iounmap(ugeth->ug_regs);
ugeth->ug_regs = NULL;
}
}

static void ucc_geth_set_multi(struct net_device *dev)
Expand Down Expand Up @@ -2423,7 +2426,12 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
return -ENOMEM;
}

ugeth->ug_regs = (struct ucc_geth __iomem *) ioremap(uf_info->regs, sizeof(struct ucc_geth));
ugeth->ug_regs = ioremap(uf_info->regs, sizeof(*ugeth->ug_regs));
if (!ugeth->ug_regs) {
if (netif_msg_probe(ugeth))
ugeth_err("%s: Failed to ioremap regs.", __func__);
return -ENOMEM;
}

return 0;
}
Expand Down Expand Up @@ -3689,7 +3697,7 @@ static int ucc_geth_open(struct net_device *dev)
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot configure internal struct, aborting.", dev->name);
return err;
goto out_err_stop;
}

napi_enable(&ugeth->napi);
Expand Down Expand Up @@ -3752,6 +3760,7 @@ static int ucc_geth_open(struct net_device *dev)

out_err:
napi_disable(&ugeth->napi);
out_err_stop:
ucc_geth_stop(ugeth);
return err;
}
Expand Down

0 comments on commit 89b0220

Please sign in to comment.