Use OF_prop_free instead of direct call to free(9)

Reviewed by:	mmel@
This commit is contained in:
Oleksandr Tymoshenko 2016-05-14 05:00:17 +00:00
parent f4eefe43b2
commit bebd526933
5 changed files with 9 additions and 9 deletions

View File

@ -254,9 +254,9 @@ as3722_pinmux_process_node(struct as3722_softc *sc, phandle_t node)
} while (len < lpins);
if (pins != NULL)
free(pins, M_OFWPROP);
OF_prop_free(pins);
if (cfg.function != NULL)
free(cfg.function, M_OFWPROP);
OF_prop_free(cfg.function);
return (rv);
}

View File

@ -164,7 +164,7 @@ tegra124_coretemp_ofw_parse(struct tegra124_coretemp_softc *sc)
}
sc->tsens_id = 0x100 + sc->cpu_id; //cells[0];
free(cells, M_OFWPROP);
OF_prop_free(cells);
sc->tsens_dev = OF_device_from_xref(xnode);
if (sc->tsens_dev == NULL) {

View File

@ -274,9 +274,9 @@ xusbpadctl_process_node(struct xusbpadctl_softc *sc, phandle_t node)
} while (len < llanes);
if (lanes != NULL)
free(lanes, M_OFWPROP);
OF_prop_free(lanes);
if (cfg.function != NULL)
free(cfg.function, M_OFWPROP);
OF_prop_free(cfg.function);
return (rv);
}

View File

@ -693,9 +693,9 @@ pinmux_process_node(struct pinmux_softc *sc, phandle_t node)
} while (len < lpins);
if (pins != NULL)
free(pins, M_OFWPROP);
OF_prop_free(pins);
if (cfg.function != NULL)
free(cfg.function, M_OFWPROP);
OF_prop_free(cfg.function);
return (rv);
}

View File

@ -593,7 +593,7 @@ usb_get_ifc_mode(device_t dev, phandle_t node, char *name)
ret = USB_IFC_TYPE_ULPI;
else
device_printf(dev, "Unsupported phy type: %s\n", tmpstr);
free(tmpstr, M_OFWPROP);
OF_prop_free(tmpstr);
return (ret);
}
@ -617,7 +617,7 @@ usb_get_dr_mode(device_t dev, phandle_t node, char *name)
ret = USB_DR_MODE_OTG;
else
device_printf(dev, "Unknown dr mode: %s\n", tmpstr);
free(tmpstr, M_OFWPROP);
OF_prop_free(tmpstr);
return (ret);
}