Skip to contentSkip to conversation

ASoC: samsung: spdif: remove unnecessary check of mem_res

PATCH In review Yang Yingliang 2 participants 2 messages May 10, 2022

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

PATCH 1/1 ASoC: samsung: spdif: remove unnecessary check of mem_res

The resource is checked in probe function, so there is no need do this check in remove function.

---
 sound/soc/samsung/spdif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/samsung/spdif.c +1 -2
index 226c359892e9..47b6d19e43ff 100644
@@ -467,8 +467,7 @@ static int spdif_remove(struct platform_device *pdev)
 	iounmap(spdif->regs);
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (mem_res)
-		release_mem_region(mem_res->start, resource_size(mem_res));
+	release_mem_region(mem_res->start, resource_size(mem_res));
 
 	clk_disable_unprepare(spdif->sclk);
 	clk_disable_unprepare(spdif->pclk);
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 4 lines · Yang Yingliang

The resource is checked in probe function, so there is no need do this check in remove function.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: samsung: spdif: remove unnecessary check of mem_res

      commit: 9d62ba94266be3ddc864348a4df7e54f5562f0d5

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