Re: [PATCH] Revert spi/doc: spi_master_put must be followed up by kfree

2012-09-04 Thread Uwe Kleine-König
On Mon, Sep 03, 2012 at 01:26:26PM -0700, Guenter Roeck wrote: Actually, spi_master_put() after spi_alloc_master() must _not_ be followed by kfree(). The memory is already freed with the call to spi_master_put() through spi_master_class, which registers a release function. Calling both

[PATCH] Revert spi/doc: spi_master_put must be followed up by kfree

2012-09-03 Thread Guenter Roeck
Actually, spi_master_put() after spi_alloc_master() must _not_ be followed by kfree(). The memory is already freed with the call to spi_master_put() through spi_master_class, which registers a release function. Calling both spi_master_put() and kfree() results in often nasty (and delayed) crashes