From: Yang Yingliang Date: Tue, 10 May 2022 12:47:49 +0000 (+0800) Subject: ASoC: samsung: spdif: remove unnecessary check of mem_res X-Git-Tag: v5.19-rc1~152^2~2^2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d62ba94266be3ddc864348a4df7e54f5562f0d5;p=thirdparty%2Fkernel%2Flinux.git 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. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220510124749.2663874-1-yangyingliang@huawei.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 226c359892e9f..47b6d19e43ffb 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -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);