diff mbox series

[-next] spi: sifive: Remove spi_master_put in sifive_spi_remove()

Message ID 20190222054616.4523-1-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Commit 049e5feae18fe07df0687dc14582f338dde3fb56
Headers show
Series [-next] spi: sifive: Remove spi_master_put in sifive_spi_remove() | expand

Commit Message

Wei Yongjun Feb. 22, 2019, 5:46 a.m. UTC
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>
---
 drivers/spi/spi-sifive.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

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;
 }