Delete redundant return value check of platform_get_resource()
authorBelen Sarabia <belensarabia@gmail.com>
Mon, 27 Feb 2017 21:41:18 +0000 (22:41 +0100)
committerTejun Heo <tj@kernel.org>
Mon, 6 Mar 2017 20:40:59 +0000 (15:40 -0500)
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>
drivers/ata/ahci_octeon.c

index ea865fe953e1f8c620ef896164be71e7a8bb8740..5a44e089c6bb6ae23f7e4f984c7cc069c0e77744 100644 (file)
@@ -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);