diff --git a/sys/arm/ti/ti_adc.c b/sys/arm/ti/ti_adc.c index e8dd6d835f7d..9f545e0e4a38 100644 --- a/sys/arm/ti/ti_adc.c +++ b/sys/arm/ti/ti_adc.c @@ -732,7 +732,7 @@ ti_adc_attach(device_t dev) sc->sc_charge_delay = DEFAULT_CHARGE_DELAY; /* Read "tsc" node properties */ child = ofw_bus_find_child(node, "tsc"); - if (child != 0) { + if (child != 0 && OF_hasprop(child, "ti,wires")) { if ((OF_getprop(child, "ti,wires", &cell, sizeof(cell))) > 0) sc->sc_tsc_wires = fdt32_to_cpu(cell); if ((OF_getprop(child, "ti,coordinate-readouts", &cell, sizeof(cell))) > 0) @@ -745,7 +745,7 @@ ti_adc_attach(device_t dev) sizeof(*wire_configs), (void **)&wire_configs); if (nwire_configs != sc->sc_tsc_wires) { device_printf(sc->sc_dev, - "invalid nubmer of ti,wire-config: %d (should be %d)\n", + "invalid number of ti,wire-config: %d (should be %d)\n", nwire_configs, sc->sc_tsc_wires); OF_prop_free(wire_configs); return (EINVAL);