Author: gonzo
Date: Sat May 14 05:00:17 2016
New Revision: 299715
URL: https://svnweb.freebsd.org/changeset/base/299715

Log:
  Use OF_prop_free instead of direct call to free(9)
  
  Reviewed by:  mmel@

Modified:
  head/sys/arm/nvidia/as3722_gpio.c
  head/sys/arm/nvidia/tegra124/tegra124_coretemp.c
  head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c
  head/sys/arm/nvidia/tegra_pinmux.c
  head/sys/arm/nvidia/tegra_usbphy.c

Modified: head/sys/arm/nvidia/as3722_gpio.c
==============================================================================
--- head/sys/arm/nvidia/as3722_gpio.c   Sat May 14 04:59:36 2016        
(r299714)
+++ head/sys/arm/nvidia/as3722_gpio.c   Sat May 14 05:00:17 2016        
(r299715)
@@ -254,9 +254,9 @@ as3722_pinmux_process_node(struct as3722
        } 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);
 }

Modified: head/sys/arm/nvidia/tegra124/tegra124_coretemp.c
==============================================================================
--- head/sys/arm/nvidia/tegra124/tegra124_coretemp.c    Sat May 14 04:59:36 
2016        (r299714)
+++ head/sys/arm/nvidia/tegra124/tegra124_coretemp.c    Sat May 14 05:00:17 
2016        (r299715)
@@ -164,7 +164,7 @@ tegra124_coretemp_ofw_parse(struct tegra
        }
 
        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) {

Modified: head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c
==============================================================================
--- head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c  Sat May 14 04:59:36 
2016        (r299714)
+++ head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c  Sat May 14 05:00:17 
2016        (r299715)
@@ -274,9 +274,9 @@ xusbpadctl_process_node(struct xusbpadct
        } 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);
 }
 

Modified: head/sys/arm/nvidia/tegra_pinmux.c
==============================================================================
--- head/sys/arm/nvidia/tegra_pinmux.c  Sat May 14 04:59:36 2016        
(r299714)
+++ head/sys/arm/nvidia/tegra_pinmux.c  Sat May 14 05:00:17 2016        
(r299715)
@@ -693,9 +693,9 @@ pinmux_process_node(struct pinmux_softc 
        } 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);
 }
 

Modified: head/sys/arm/nvidia/tegra_usbphy.c
==============================================================================
--- head/sys/arm/nvidia/tegra_usbphy.c  Sat May 14 04:59:36 2016        
(r299714)
+++ head/sys/arm/nvidia/tegra_usbphy.c  Sat May 14 05:00:17 2016        
(r299715)
@@ -593,7 +593,7 @@ usb_get_ifc_mode(device_t dev, phandle_t
                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 
                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);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to