From: Guenter Roeck Date: Sat, 18 Aug 2012 16:29:23 +0000 (-0700) Subject: spi/mpc52xx-psc: Avoid access to freed memory in device remove function X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~41^2~1^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c87c656f95d764eb2b460b46b0144794108da4;p=pandora-kernel.git spi/mpc52xx-psc: Avoid access to freed memory in device remove function 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 master 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