]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/spi/spi-omap2-mcspi.c
Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[karo-tx-linux.git] / drivers / spi / spi-omap2-mcspi.c
index 46ef5fe51db5476b797bffe719fed5bbfccca395..0c73dd4f43a0d0a7e727e1f92a0929095becd392 100644 (file)
@@ -801,7 +801,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
        mcspi_dma = &mcspi->dma_channels[spi->chip_select];
 
        if (!cs) {
-               cs = devm_kzalloc(&spi->dev , sizeof *cs, GFP_KERNEL);
+               cs = kzalloc(sizeof *cs, GFP_KERNEL);
                if (!cs)
                        return -ENOMEM;
                cs->base = mcspi->base + spi->chip_select * 0x14;
@@ -842,6 +842,7 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
                cs = spi->controller_state;
                list_del(&cs->node);
 
+               kfree(cs);
        }
 
        if (spi->chip_select < spi->master->num_chipselect) {