Use OF_prop_free instead of direct call to free(9)
This commit is contained in:
parent
bcc5b0c55d
commit
ba09ef761b
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user