Skip to contentSkip to conversation

Delete redundant return value check of platform_get_resource()

PATCH Applied Belen Sarabia 2 participants 2 messages Feb 27, 2017 – Mar 6, 2017 libata

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Delete redundant return value check of platform_get_resource()

Delete error handling from the result of a call to platform_get_resource() when the value is immediately passed to devm_ioremap_resource().

---
 drivers/ata/ahci_octeon.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/ata/ahci_octeon.c +0 -5
index ea865fe..5a44e08 100644
@@ -38,11 +38,6 @@ static int ahci_octeon_probe(struct platform_device *pdev)
 	int ret;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Platform resource[0] is missing\n");
-		return -ENODEV;
-	}
-
 	base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 4 lines · Belen Sarabia

Delete error handling from the result of a call to platform_get_resource() when the value is immediately passed to devm_ioremap_resource().

Applied to libata/for-4.12.

Thanks.

Signature · 1 line
tejun