Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: armada-3700: Remove spi_master_put in a3700_spi_remove()

The call to spi_master_put() in a3700_spi_remove() is redundant since
the master is registered using devm_spi_register_master() and no
reference hold by using spi_master_get() in a3700_spi_remove().

This is detected by Coccinelle semantic patch.

Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Wei Yongjun and committed by
Mark Brown
e92f0051 d9928b4c

-1
-1
drivers/spi/spi-armada-3700.c
··· 901 901 struct a3700_spi *spi = spi_master_get_devdata(master); 902 902 903 903 clk_unprepare(spi->clk); 904 - spi_master_put(master); 905 904 906 905 return 0; 907 906 }