Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Chris Ball <chris@printf.net>
        if (res == NULL)
                return -EBUSY;
 
-       host = kzalloc(sizeof(struct mmc_omap_host), GFP_KERNEL);
+       host = devm_kzalloc(&pdev->dev, sizeof(struct mmc_omap_host),
+                           GFP_KERNEL);
        if (host == NULL) {
                ret = -ENOMEM;
                goto err_free_mem_region;
 err_free_mmc_host:
        iounmap(host->virt_base);
 err_ioremap:
-       kfree(host);
 err_free_mem_region:
        release_mem_region(res->start, resource_size(res));
        return ret;
                           pdev->resource[0].end - pdev->resource[0].start + 1);
        destroy_workqueue(host->mmc_omap_wq);
 
-       kfree(host);
-
        return 0;
 }