cpsw->cpts = cpts_create(cpsw->dev, cpts_regs, cpsw->dev->of_node);
        if (IS_ERR(cpsw->cpts)) {
                ret = PTR_ERR(cpsw->cpts);
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        ndev->irq = platform_get_irq(pdev, 1);
        if (ndev->irq < 0) {
                dev_err(priv->dev, "error getting irq resource\n");
                ret = ndev->irq;
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        of_id = of_match_device(cpsw_of_mtable, &pdev->dev);
        if (ret) {
                dev_err(priv->dev, "error registering net device\n");
                ret = -ENODEV;
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        if (cpsw->data.dual_emac) {
        irq = platform_get_irq(pdev, 1);
        if (irq < 0) {
                ret = irq;
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        cpsw->irqs_table[0] = irq;
                               0, dev_name(&pdev->dev), cpsw);
        if (ret < 0) {
                dev_err(priv->dev, "error attaching irq (%d)\n", ret);
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        /* TX IRQ */
        irq = platform_get_irq(pdev, 2);
        if (irq < 0) {
                ret = irq;
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        cpsw->irqs_table[1] = irq;
                               0, dev_name(&pdev->dev), cpsw);
        if (ret < 0) {
                dev_err(priv->dev, "error attaching irq (%d)\n", ret);
-               goto clean_ale_ret;
+               goto clean_dma_ret;
        }
 
        cpsw_notice(priv, probe,
 
 clean_unregister_netdev_ret:
        unregister_netdev(ndev);
-clean_ale_ret:
-       cpsw_ale_destroy(cpsw->ale);
 clean_dma_ret:
        cpdma_ctlr_destroy(cpsw->dma);
 clean_dt_ret:
        unregister_netdev(ndev);
 
        cpts_release(cpsw->cpts);
-       cpsw_ale_destroy(cpsw->ale);
        cpdma_ctlr_destroy(cpsw->dma);
        cpsw_remove_dt(pdev);
        pm_runtime_put_sync(&pdev->dev);
 
        struct cpsw_ale *ale;
        u32 rev, ale_entries;
 
-       ale = kzalloc(sizeof(*ale), GFP_KERNEL);
+       ale = devm_kzalloc(params->dev, sizeof(*ale), GFP_KERNEL);
        if (!ale)
                return NULL;
 
 }
 EXPORT_SYMBOL_GPL(cpsw_ale_create);
 
-int cpsw_ale_destroy(struct cpsw_ale *ale)
-{
-       if (!ale)
-               return -EINVAL;
-       kfree(ale);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(cpsw_ale_destroy);
-
 void cpsw_ale_dump(struct cpsw_ale *ale, u32 *data)
 {
        int i;
 
 #define ALE_ENTRY_WORDS        DIV_ROUND_UP(ALE_ENTRY_BITS, 32)
 
 struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params);
-int cpsw_ale_destroy(struct cpsw_ale *ale);
 
 void cpsw_ale_start(struct cpsw_ale *ale);
 void cpsw_ale_stop(struct cpsw_ale *ale);