mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Use OF_prop_free instead of direct call to free(9)
Approved by: jmcneill
This commit is contained in:
parent
bb307f247a
commit
39a997283f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299703
@ -536,8 +536,8 @@ aw_fdt_configure_pins(device_t dev, phandle_t cfgxref)
|
||||
}
|
||||
|
||||
out:
|
||||
free(pinlist, M_OFWPROP);
|
||||
free(pin_function, M_OFWPROP);
|
||||
OF_prop_free(pinlist);
|
||||
OF_prop_free(pin_function);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
@ -128,8 +128,8 @@ aw_cpuclk_attach(device_t dev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
free(__DECONST(char *, def.clkdef.parent_names), M_OFWPROP);
|
||||
free(__DECONST(char *, def.clkdef.name), M_OFWPROP);
|
||||
OF_prop_free(__DECONST(char *, def.clkdef.parent_names));
|
||||
OF_prop_free(__DECONST(char *, def.clkdef.name));
|
||||
|
||||
if (bootverbose)
|
||||
clkdom_dump(clkdom);
|
||||
@ -137,7 +137,7 @@ aw_cpuclk_attach(device_t dev)
|
||||
return (0);
|
||||
|
||||
fail:
|
||||
free(__DECONST(char *, def.clkdef.name), M_OFWPROP);
|
||||
OF_prop_free(__DECONST(char *, def.clkdef.name));
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -529,11 +529,11 @@ aw_lcdclk_attach(device_t dev)
|
||||
if (sc->type == AW_LCD_CH0)
|
||||
hwreset_register_ofw_provider(dev);
|
||||
|
||||
free(parent_names, M_OFWPROP);
|
||||
OF_prop_free(parent_names);
|
||||
return (0);
|
||||
|
||||
fail:
|
||||
free(parent_names, M_OFWPROP);
|
||||
OF_prop_free(parent_names);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -103,12 +103,12 @@ aw_oscclk_attach(device_t dev)
|
||||
if (bootverbose)
|
||||
clkdom_dump(clkdom);
|
||||
|
||||
free(__DECONST(char *, def.clkdef.name), M_OFWPROP);
|
||||
OF_prop_free(__DECONST(char *, def.clkdef.name));
|
||||
|
||||
return (0);
|
||||
|
||||
fail:
|
||||
free(__DECONST(char *, def.clkdef.name), M_OFWPROP);
|
||||
OF_prop_free(__DECONST(char *, def.clkdef.name));
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -723,7 +723,7 @@ aw_pll_create(device_t dev, bus_addr_t paddr, struct clkdom *clkdom,
|
||||
|
||||
clknode_register(clkdom, clk);
|
||||
|
||||
free(__DECONST(char *, clkdef.parent_names), M_OFWPROP);
|
||||
OF_prop_free(__DECONST(char *, clkdef.parent_names));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -951,7 +951,7 @@ awg_setup_extres(device_t dev)
|
||||
tx_parent_name = "emac_int_tx";
|
||||
else
|
||||
tx_parent_name = "mii_phy_tx";
|
||||
free(phy_type, M_OFWPROP);
|
||||
OF_prop_free(phy_type);
|
||||
|
||||
/* Get the TX clock */
|
||||
error = clk_get_by_ofw_name(dev, "tx", &clk_tx);
|
||||
@ -1034,7 +1034,7 @@ awg_setup_extres(device_t dev)
|
||||
return (0);
|
||||
|
||||
fail:
|
||||
free(phy_type, M_OFWPROP);
|
||||
OF_prop_free(phy_type);
|
||||
|
||||
if (reg != NULL)
|
||||
regulator_release(reg);
|
||||
|
Loading…
Reference in New Issue
Block a user