diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-26 10:56:50 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-07-27 14:00:16 -0400 |
commit | c2b08cede727387a5e19b40fa8e1a1e3a53e8527 (patch) | |
tree | 076f6cc2f8c9bf1014eb786688dcbe4a0f6c08bd | |
parent | 6678716751af24af09163aef54bbabb60c12e18b (diff) |
spi: mediatek: remove spi_master_put in mtk_spi_remove()
The call to spi_master_put() in mtk_spi_remove() is redundant since
the master is registered using devm_spi_register_master() and no
reference hold by using spi_master_get() in mtk_spi_remove().
This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-mt65xx.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 0be89e052428..899d7a8f0889 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c | |||
@@ -685,7 +685,6 @@ static int mtk_spi_remove(struct platform_device *pdev) | |||
685 | pm_runtime_disable(&pdev->dev); | 685 | pm_runtime_disable(&pdev->dev); |
686 | 686 | ||
687 | mtk_spi_reset(mdata); | 687 | mtk_spi_reset(mdata); |
688 | spi_master_put(master); | ||
689 | 688 | ||
690 | return 0; | 689 | return 0; |
691 | } | 690 | } |