summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-02-22 05:46:16 +0000
committerMark Brown <broonie@kernel.org>2019-02-22 15:17:43 +0000
commit049e5feae18fe07df0687dc14582f338dde3fb56 (patch)
tree30f4a47552d4067ac64de14406598f40ec69a4a3 /drivers
parentbf9f742c38c4604a8ee349f7baefca58b3a5ff67 (diff)
downloadlinux-049e5feae18fe07df0687dc14582f338dde3fb56.tar.bz2
spi: sifive: Remove spi_master_put in sifive_spi_remove()
The call to spi_master_put() in sifive_spi_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in sifive_spi_remove(). This is detected by Coccinelle semantic patch. Fixes: 484a9a68d669 ("spi: sifive: Add driver for the SiFive SPI controller") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-sifive.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c
index 961307c4a613..ebca3fc4d345 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -424,7 +424,6 @@ static int sifive_spi_remove(struct platform_device *pdev)
/* Disable all the interrupts just in case */
sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0);
- spi_master_put(master);
return 0;
}