mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
[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>
This commit is contained in:
parent
1387780f7d
commit
125d128bec
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user