diff options
author | imp <imp@FreeBSD.org> | 2008-08-23 07:46:20 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-08-23 07:46:20 +0000 |
commit | 8da6ff44f12c6b055dc2cada942143931c749c6f (patch) | |
tree | 42cdecf1532cbada31a0f2a92f29bf693feb1c40 /sys/dev/mii/mlphy.c | |
parent | b06e92ed2896a3c87c3d8a64f23c8a458d36feb0 (diff) | |
download | FreeBSD-src-8da6ff44f12c6b055dc2cada942143931c749c6f.zip FreeBSD-src-8da6ff44f12c6b055dc2cada942143931c749c6f.tar.gz |
Set devs to 0 in case device_get_children return an error. The right thing
to do here is nothing in that case...
Diffstat (limited to 'sys/dev/mii/mlphy.c')
-rw-r--r-- | sys/dev/mii/mlphy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/mii/mlphy.c b/sys/dev/mii/mlphy.c index d0a549c..9eba9da 100644 --- a/sys/dev/mii/mlphy.c +++ b/sys/dev/mii/mlphy.c @@ -194,6 +194,7 @@ mlphy_service(xsc, mii, cmd) * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ + devs = 0; device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "mlphy")) { @@ -400,6 +401,7 @@ mlphy_status(sc) int devs, i; /* See if there's another PHY on the bus with us. */ + devs = 0; device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "mlphy")) { |