From: Jeff Harris Date: Fri, 23 Sep 2011 15:49:36 +0000 (-0400) Subject: spi: Fix WARN when removing spi-fsl-spi module X-Git-Tag: v3.1-rc8~11^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=387719c2ec995019e0af0dc537ca17c9ebd5b64f;p=pandora-kernel.git spi: Fix WARN when removing spi-fsl-spi module If CPM mode is not used, the fsl_dummy_rx variable is never allocated. When the cleanup attempts to free it, the reference count is zero and a WARN is generated. The same CPM mode check used in the initialize is applied to the free as well. Tested on 2.6.33 with the previous spi_mpc8xxx driver. The renamed spi-fsl-spi driver looks to have the same problem. Signed-off-by: Jeff Harris Signed-off-by: Grant Likely --- Reading git-diff-tree failed