Use OF_prop_free instead of direct call to free(9)

This commit is contained in:
Oleksandr Tymoshenko 2016-05-14 18:44:30 +00:00
parent fdce57a042
commit 27b917c85e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299747
2 changed files with 4 additions and 4 deletions

View file

@ -120,11 +120,11 @@ altera_avgen_fdt_attach(device_t dev)
bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid,
sc->avg_res);
if (str_fileio != NULL)
free(str_fileio, M_OFWPROP);
OF_prop_free(str_fileio);
if (str_mmapio != NULL)
free(str_mmapio, M_OFWPROP);
OF_prop_free(str_mmapio);
if (str_devname != NULL)
free(str_devname, M_OFWPROP);
OF_prop_free(str_devname);
return (error);
}

View file

@ -176,7 +176,7 @@ enable_usb(device_t dev, bus_space_tag_t iot, bus_space_handle_t ioh)
(OF_getprop_alloc(node, "phy_type", 1, (void **)&phy_type) > 0)) {
if (strncasecmp(phy_type, "utmi", strlen("utmi")) == 0)
tmp |= UTMI_PHY_EN;
free(phy_type, M_OFWPROP);
OF_prop_free(phy_type);
}
bus_space_write_4(iot, ioh, CONTROL, tmp);
}