diff options
| author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-12-30 20:23:14 +0000 |
|---|---|---|
| committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-12-30 20:23:14 +0000 |
| commit | 223d42a4de4e9a3d6416db878abd375a41ea1225 (patch) | |
| tree | 1bab6b7377c8cbee753b9611e5592fc8d51fd053 /sys/dev/vt | |
| parent | ac2b436d20b41a90cd5cc59ac3f8aeff3375aa4e (diff) | |
Notes
Diffstat (limited to 'sys/dev/vt')
| -rw-r--r-- | sys/dev/vt/hw/ofwfb/ofwfb.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index 5c9c0695ce94..b974803bffee 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -94,8 +94,13 @@ ofwfb_probe(struct vt_device *vd) char type[64]; chosen = OF_finddevice("/chosen"); - OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); - node = OF_instance_to_package(stdout); + if (chosen == -1) + return (CN_DEAD); + + node = -1; + if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == + sizeof(stdout)) + node = OF_instance_to_package(stdout); if (node == -1) { /* * The "/chosen/stdout" does not exist try |
