Use OF_prop_free instead of direct call to free(9)
Reviewed by: ganbold
This commit is contained in:
parent
fb0eab090e
commit
c9fabc7afc
@ -141,7 +141,7 @@ aml8726_ccm_configure_gates(struct aml8726_ccm_softc *sc)
|
||||
AML_CCM_UNLOCK(sc);
|
||||
}
|
||||
|
||||
free(functions, M_OFWPROP);
|
||||
OF_prop_free(functions);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -605,11 +605,11 @@ aml8726_mmc_attach(device_t dev)
|
||||
else {
|
||||
device_printf(dev, "unknown function attribute %.*s in FDT\n",
|
||||
len, function_name);
|
||||
free(function_name, M_OFWPROP);
|
||||
OF_prop_free(function_name);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
free(function_name, M_OFWPROP);
|
||||
OF_prop_free(function_name);
|
||||
|
||||
sc->pwr_en.dev = NULL;
|
||||
|
||||
@ -661,7 +661,7 @@ aml8726_mmc_attach(device_t dev)
|
||||
device_printf(dev,
|
||||
"unknown voltage attribute %.*s in FDT\n",
|
||||
len, voltage);
|
||||
free(voltages, M_OFWPROP);
|
||||
OF_prop_free(voltages);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
@ -678,7 +678,7 @@ aml8726_mmc_attach(device_t dev)
|
||||
}
|
||||
}
|
||||
|
||||
free(voltages, M_OFWPROP);
|
||||
OF_prop_free(voltages);
|
||||
|
||||
sc->vselect.dev = NULL;
|
||||
|
||||
|
@ -210,11 +210,11 @@ aml8726_pinctrl_configure_pins(device_t dev, phandle_t cfgxref)
|
||||
if (f->name == NULL) {
|
||||
device_printf(dev, "unknown function attribute %.*s in FDT\n",
|
||||
len, function_name);
|
||||
free(function_name, M_OFWPROP);
|
||||
OF_prop_free(function_name);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
free(function_name, M_OFWPROP);
|
||||
OF_prop_free(function_name);
|
||||
|
||||
len = OF_getprop_alloc(node, "amlogic,pull",
|
||||
sizeof(char), (void **)&pull);
|
||||
@ -234,12 +234,12 @@ aml8726_pinctrl_configure_pins(device_t dev, phandle_t cfgxref)
|
||||
device_printf(dev,
|
||||
"unknown pull attribute %.*s in FDT\n",
|
||||
len, pull);
|
||||
free(pull, M_OFWPROP);
|
||||
OF_prop_free(pull);
|
||||
return (ENXIO);
|
||||
}
|
||||
}
|
||||
|
||||
free(pull, M_OFWPROP);
|
||||
OF_prop_free(pull);
|
||||
|
||||
/*
|
||||
* Setting the pull direction isn't supported on all SoC.
|
||||
@ -403,7 +403,7 @@ aml8726_pinctrl_configure_pins(device_t dev, phandle_t cfgxref)
|
||||
AML_PINCTRL_UNLOCK(sc);
|
||||
}
|
||||
|
||||
free(pins, M_OFWPROP);
|
||||
OF_prop_free(pins);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -821,7 +821,7 @@ aml8726_sdxc_attach(device_t dev)
|
||||
device_printf(dev,
|
||||
"unknown voltage attribute %.*s in FDT\n",
|
||||
len, voltage);
|
||||
free(voltages, M_OFWPROP);
|
||||
OF_prop_free(voltages);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
@ -838,7 +838,7 @@ aml8726_sdxc_attach(device_t dev)
|
||||
}
|
||||
}
|
||||
|
||||
free(voltages, M_OFWPROP);
|
||||
OF_prop_free(voltages);
|
||||
|
||||
sc->vselect.dev = NULL;
|
||||
|
||||
|
@ -139,7 +139,7 @@ aml8726_usb_phy_mode(const char *dwcotg_path, uint32_t *mode)
|
||||
AML_USB_PHY_MISC_ID_OVERIDE_DEVICE;
|
||||
}
|
||||
|
||||
free(usb_mode, M_OFWPROP);
|
||||
OF_prop_free(usb_mode);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -214,7 +214,7 @@ aml8726_usb_phy_attach(device_t dev)
|
||||
}
|
||||
}
|
||||
|
||||
free(prop, M_OFWPROP);
|
||||
OF_prop_free(prop);
|
||||
|
||||
if (err) {
|
||||
device_printf(dev, "unable to parse gpio\n");
|
||||
|
@ -164,7 +164,7 @@ aml8726_usb_phy_attach(device_t dev)
|
||||
sc->force_aca = TRUE;
|
||||
}
|
||||
|
||||
free(force_aca, M_OFWPROP);
|
||||
OF_prop_free(force_aca);
|
||||
|
||||
err = 0;
|
||||
|
||||
@ -187,7 +187,7 @@ aml8726_usb_phy_attach(device_t dev)
|
||||
}
|
||||
}
|
||||
|
||||
free(prop, M_OFWPROP);
|
||||
OF_prop_free(prop);
|
||||
|
||||
len = OF_getencprop_alloc(node, "usb-hub-rst",
|
||||
3 * sizeof(pcell_t), (void **)&prop);
|
||||
@ -200,7 +200,7 @@ aml8726_usb_phy_attach(device_t dev)
|
||||
err = 1;
|
||||
}
|
||||
|
||||
free(prop, M_OFWPROP);
|
||||
OF_prop_free(prop);
|
||||
|
||||
if (err) {
|
||||
device_printf(dev, "unable to parse gpio\n");
|
||||
|
Loading…
Reference in New Issue
Block a user