spi: efm32: Don't call kfree() after spi_master_put()

Calling kfree() to clean up the memory obtained from spi_alloc_master() is
wrong as this is done in spi_master_release() when spi_master->dev's refcount
reaches zero.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
此提交包含在:
Axel Lin
2013-09-20 18:39:18 +08:00
提交者 Mark Brown
父節點 272b98c645
當前提交 57841439b6

查看文件

@@ -467,7 +467,6 @@ err_disable_clk:
clk_disable_unprepare(ddata->clk);
err:
spi_master_put(master);
kfree(master);
}
return ret;
@@ -484,7 +483,6 @@ static int efm32_spi_remove(struct platform_device *pdev)
free_irq(ddata->rxirq, ddata);
clk_disable_unprepare(ddata->clk);
spi_master_put(master);
kfree(master);
return 0;
}