diff options
author | Kumar Gala <galak@gate.crashing.org> | 2005-11-09 12:13:11 -0600 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-11 08:26:58 -0500 |
commit | 125d128bec1bbf81be4c198243334a6153c0b023 (patch) | |
tree | 0535e94300fe0e8f96d591c7a73fd2190d4b6255 | |
parent | 1387780f7dbaa8c770fbbbec3b2f42cd9adf1921 (diff) | |
download | op-kernel-dev-125d128bec1bbf81be4c198243334a6153c0b023.zip op-kernel-dev-125d128bec1bbf81be4c198243334a6153c0b023.tar.gz |
[PATCH] gianfar mii needs to zero out the mii_bus structure
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@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | 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 7263395..9544279 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c @@ -133,7 +133,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; |