]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Fix WARN when removing spi-fsl-spi module
authorJeff Harris <jeff_harris@kentrox.com>
Fri, 23 Sep 2011 15:49:36 +0000 (11:49 -0400)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 23 Sep 2011 23:28:29 +0000 (17:28 -0600)
commitc0dc566eed99be4e6b6cfff96c740cd3a512fd2f
tree7c8761429702dc6974e016de62d25e690b4cd9fe
parent45b89c7110dffc824a3984f98b1cdb590455e0f6
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 <jeff_harris@kentrox.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi-fsl-spi.c