Skip to contentSkip to conversation

spi: sifive: Remove spi_master_put in sifive_spi_remove()

PATCH In review Wei Yongjun 2 participants 2 messages Feb 22, 2019 – Feb 26, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/spi/spi-sifive.c | 1 -
 1 file changed, 1 deletion(-)
drivers/spi/spi-sifive.c +0 -1
index 961307c4a613..ebca3fc4d345 100644
@@ -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;
 }

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer
#1 lore raw

Applied "spi: sifive: Remove spi_master_put in sifive_spi_remove()" to the spi tree

The patch

spi: sifive: Remove spi_master_put in sifive_spi_remove()

has been applied to the spi tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

From 049e5feae18fe07df0687dc14582f338dde3fb56 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <[email protected]>
Date: Fri, 22 Feb 2019 05:46:16 +0000
Subject: [PATCH] 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")
---
 drivers/spi/spi-sifive.c | 1 -
 1 file changed, 1 deletion(-)
drivers/spi/spi-sifive.c +0 -1
index 961307c4a613..ebca3fc4d345 100644
@@ -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;
 }
Signature · 1 line
2.20.1