1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-10 14:02:43 +00:00

Only attach if properties we need (address, in particular) are present.

This is the correct version of r255420.

Approved by:	re (kib)
This commit is contained in:
Nathan Whitehorn 2013-09-17 17:31:53 +00:00
parent 348b50d91f
commit 982b134610
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255642

View File

@ -264,6 +264,10 @@ ofwfb_configure(int flags)
} else
return (0);
if (OF_getproplen(node, "height") != sizeof(sc->sc_height) ||
OF_getproplen(node, "width") != sizeof(sc->sc_width))
return (0);
sc->sc_depth = depth;
sc->sc_node = node;
sc->sc_console = 1;
@ -278,6 +282,8 @@ ofwfb_configure(int flags)
*
* XXX We assume #address-cells is 1 at this point.
*/
if (OF_getproplen(node, "address") != sizeof(fb_phys))
return (0);
OF_getprop(node, "address", &fb_phys, sizeof(fb_phys));
bus_space_map(&bs_be_tag, fb_phys, sc->sc_height * sc->sc_stride,