This is a note to let you know that I've just added the patch titled

    spi: dw: Don't call kfree for memory allocated by devm_kzalloc

to the 3.14-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-dw-don-t-call-kfree-for-memory-allocated-by-devm_kzalloc.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From c63f5da00845143de621e991ea186be0829647ee Mon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Tue, 25 Mar 2014 12:44:13 +0800
Subject: spi: dw: Don't call kfree for memory allocated by devm_kzalloc

From: Axel Lin <[email protected]>

commit c63f5da00845143de621e991ea186be0829647ee upstream.

With devm_kzalloc, the memory is automatically freed when spi_device detach from
the bus.

Fixes: commit 43f627ac9de42 (spi: dw: fix memory leak on error path)
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Baruch Siach <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/spi/spi-dw.c |    7 -------
 1 file changed, 7 deletions(-)

--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -671,12 +671,6 @@ static int dw_spi_setup(struct spi_devic
        return 0;
 }
 
-static void dw_spi_cleanup(struct spi_device *spi)
-{
-       struct chip_data *chip = spi_get_ctldata(spi);
-       kfree(chip);
-}
-
 static int init_queue(struct dw_spi *dws)
 {
        INIT_LIST_HEAD(&dws->queue);
@@ -806,7 +800,6 @@ int dw_spi_add_host(struct device *dev,
        master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(16);
        master->bus_num = dws->bus_num;
        master->num_chipselect = dws->num_cs;
-       master->cleanup = dw_spi_cleanup;
        master->setup = dw_spi_setup;
        master->transfer = dw_spi_transfer;
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.14/spi-dw-don-t-call-kfree-for-memory-allocated-by-devm_kzalloc.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to