1
0
Fork 0

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: 484a9a68d6 ("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>
hifive-unleashed-5.1
Wei Yongjun 2019-02-22 05:46:16 +00:00 committed by Mark Brown
parent bf9f742c38
commit 049e5feae1
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 0 additions and 1 deletions

View File

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