Browse Source

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().

Signed-off-by: Belen Sarabia <belensarabia@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Belen Sarabia 8 năm trước cách đây
mục cha
commit
487d499c67
1 tập tin đã thay đổi với 0 bổ sung5 xóa
  1. 0 5
      drivers/ata/ahci_octeon.c

+ 0 - 5
drivers/ata/ahci_octeon.c

@@ -38,11 +38,6 @@ static int ahci_octeon_probe(struct platform_device *pdev)
 	int ret;
 	int ret;
 
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	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);
 	base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(base))
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 		return PTR_ERR(base);