Skip to contentSkip to conversation

ASoC: fsl: fsl_spdif: No need to check the return value of platform_get_resource()

PATCH Applied Fabio Estevam 2 participants 2 messages Nov 4, 2013

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

PATCH 1/1 ASoC: fsl: fsl_spdif: No need to check the return value of platform_get_resource()

When using devm_ioremap_resource(), we do not need to check the return value of platform_get_resource(), so just remove it.

---
 sound/soc/fsl/fsl_spdif.c | 5 -----
 1 file changed, 5 deletions(-)
sound/soc/fsl/fsl_spdif.c +0 -5
index 76c742a..55193a5 100644
@@ -1107,11 +1107,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
 
 	/* Get the addresses and IRQ */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "could not determine device resources\n");
-		return -ENXIO;
-	}
-
 	regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 2 lines · Fabio Estevam

When using devm_ioremap_resource(), we do not need to check the return value of platform_get_resource(), so just remove it.

Applied, thanks.