aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vnic
diff options
context:
space:
mode:
authorZbigniew Bodek <zbb@FreeBSD.org>2016-01-28 16:58:49 +0000
committerZbigniew Bodek <zbb@FreeBSD.org>2016-01-28 16:58:49 +0000
commitdb7cfc199e950ec65b41c0af9c8cd515410ef230 (patch)
tree53f1d0928e06271614d4dff0918a6d6706fa765f /sys/dev/vnic
parent009d75e76452b3d0bfdea147c7158ab43d6a9a53 (diff)
downloadsrc-db7cfc199e950ec65b41c0af9c8cd515410ef230.tar.gz
src-db7cfc199e950ec65b41c0af9c8cd515410ef230.zip
Fix VNIC enumeration after r294993 and r294990
ofw_bus_get_node() must be tested against negative values since missing parent bus method will result in calling the default method which simply returns (-1): sys/dev/ofw/ofw_bus_if.m This was lost in the review process. Obtained from: Semihalf Sponsored by: Cavium
Notes
Notes: svn path=/head/; revision=294998
Diffstat (limited to 'sys/dev/vnic')
-rw-r--r--sys/dev/vnic/thunder_bgx_fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/vnic/thunder_bgx_fdt.c b/sys/dev/vnic/thunder_bgx_fdt.c
index 23f5e4137575..ec6e68f64850 100644
--- a/sys/dev/vnic/thunder_bgx_fdt.c
+++ b/sys/dev/vnic/thunder_bgx_fdt.c
@@ -244,7 +244,7 @@ bgx_fdt_find_node(struct bgx *bgx)
}
node = ofw_bus_get_node(root_pcib);
- if (node == 0) {
+ if ((int)node <= 0) {
device_printf(bgx->dev, "No parent FDT node for BGX\n");
goto out;
}