1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Fix null pointer dereference on nodes without a "compatible" property.

MFC after:	1 week
This commit is contained in:
Nathan Whitehorn 2018-04-30 19:37:32 +00:00
parent e4c7e3a1b9
commit 47280ef170
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333124

View File

@ -399,7 +399,8 @@ macio_attach(device_t dev)
continue;
if (strcmp(ofw_bus_get_name(cdev), "bmac") == 0 ||
strcmp(ofw_bus_get_compat(cdev), "bmac+") == 0) {
(ofw_bus_get_compat(cdev) != NULL &&
strcmp(ofw_bus_get_compat(cdev), "bmac+") == 0)) {
uint32_t fcr;
fcr = bus_read_4(sc->sc_memr, HEATHROW_FCR);