diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index db52f92cd27..73fcb9e0d65 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -370,9 +370,11 @@ ofwfb_init(struct vt_device *vd) /* Initialize softc */ vd->vd_softc = sc = &ofwfb_conssoftc; + node = -1; chosen = OF_finddevice("/chosen"); - OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)); - node = OF_instance_to_package(sc->sc_handle); + if (OF_getprop(chosen, "stdout", &sc->sc_handle, + sizeof(ihandle_t)) == sizeof(ihandle_t)) + node = OF_instance_to_package(sc->sc_handle); if (node == -1) { /* * The "/chosen/stdout" does not exist try