From: Guenter Roeck Date: Fri, 10 Aug 2012 20:56:27 +0000 (-0700) Subject: spi/bcm63xx: Ensure that memory is freed only after it is no longer used X-Git-Tag: v3.6-rc3~23^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f68237865b2f55badbb3f73792d573899a62475;p=pandora-kernel.git spi/bcm63xx: Ensure that memory is freed only after it is no longer used The call to spi_unregister_master() in the device remove function frees device memory, and with it any device local data. However, device local data is still accessed after the call to spi_unregister_master(). Acquire a reference to the SPI device and release it after cleanup is complete to solve the problem. Signed-off-by: Guenter Roeck Signed-off-by: Mark Brown --- Reading git-diff-tree failed