Fix null pointer dereference on nodes without a "compatible" property.
MFC after: 1 week
This commit is contained in:
parent
e4c7e3a1b9
commit
47280ef170
@ -399,7 +399,8 @@ macio_attach(device_t dev)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (strcmp(ofw_bus_get_name(cdev), "bmac") == 0 ||
|
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;
|
uint32_t fcr;
|
||||||
|
|
||||||
fcr = bus_read_4(sc->sc_memr, HEATHROW_FCR);
|
fcr = bus_read_4(sc->sc_memr, HEATHROW_FCR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user