[PATCH] gianfar mii needs to zero out the mii_bus structure
Kumar Gala
galak at gate.crashing.org
Thu Nov 10 05:13:11 EST 2005
To ensure that phy_mask and any future elements of the mii_bus
structure are initialized use kzalloc() instead of kmalloc().
This fixes an issue in which phy_mask was not being initialized
and we would skip random phy addresses when scanning.
Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
---
commit 35003e02e33939b7359635f3cf7b424723ffd4b0
tree 386160e32c51e8f1e662811738e79571c7218fdb
parent d0876a2748ddc33ca9ed1ea26cf958726c50c7b9
author Kumar Gala <galak at kernel.crashing.org> Wed, 09 Nov 2005 12:11:40 -0600
committer Kumar Gala <galak at kernel.crashing.org> Wed, 09 Nov 2005 12:11:40 -0600
drivers/net/gianfar_mii.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index 5a74d3d..ee1a77a 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -134,7 +134,7 @@ int gfar_mdio_probe(struct device *dev)
if (NULL == dev)
return -EINVAL;
- new_bus = kmalloc(sizeof(struct mii_bus), GFP_KERNEL);
+ new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
if (NULL == new_bus)
return -ENOMEM;
More information about the Linuxppc-embedded
mailing list