diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-omap2-mcspi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 46ef5fe51db5..0c73dd4f43a0 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -801,7 +801,7 @@ static int omap2_mcspi_setup(struct spi_device *spi) | |||
801 | mcspi_dma = &mcspi->dma_channels[spi->chip_select]; | 801 | mcspi_dma = &mcspi->dma_channels[spi->chip_select]; |
802 | 802 | ||
803 | if (!cs) { | 803 | if (!cs) { |
804 | cs = devm_kzalloc(&spi->dev , sizeof *cs, GFP_KERNEL); | 804 | cs = kzalloc(sizeof *cs, GFP_KERNEL); |
805 | if (!cs) | 805 | if (!cs) |
806 | return -ENOMEM; | 806 | return -ENOMEM; |
807 | cs->base = mcspi->base + spi->chip_select * 0x14; | 807 | cs->base = mcspi->base + spi->chip_select * 0x14; |
@@ -842,6 +842,7 @@ static void omap2_mcspi_cleanup(struct spi_device *spi) | |||
842 | cs = spi->controller_state; | 842 | cs = spi->controller_state; |
843 | list_del(&cs->node); | 843 | list_del(&cs->node); |
844 | 844 | ||
845 | kfree(cs); | ||
845 | } | 846 | } |
846 | 847 | ||
847 | if (spi->chip_select < spi->master->num_chipselect) { | 848 | if (spi->chip_select < spi->master->num_chipselect) { |