summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-efm32.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-09-20 12:39:18 +0200
committerMark Brown <broonie@linaro.org>2013-09-23 15:53:10 +0200
commit57841439b62e3ddb5ee50e765aa50330dde612d0 (patch)
treea9d2cb93e4dd40deeaa55ac8fdb26862c44aa9f1 /drivers/spi/spi-efm32.c
parentLinux 3.12-rc1 (diff)
downloadlinux-57841439b62e3ddb5ee50e765aa50330dde612d0.tar.xz
linux-57841439b62e3ddb5ee50e765aa50330dde612d0.zip
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>
Diffstat (limited to 'drivers/spi/spi-efm32.c')
-rw-r--r--drivers/spi/spi-efm32.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c
index 7d84418a01d8..5b3117f69507 100644
--- a/drivers/spi/spi-efm32.c
+++ b/drivers/spi/spi-efm32.c
@@ -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;
}