From: Belen Sarabia Date: Mon, 27 Feb 2017 21:41:18 +0000 (+0100) Subject: Delete redundant return value check of platform_get_resource() X-Git-Tag: v4.12-rc1~167^2~8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=487d499c6758d81954d684f1dd8edc54257cad0f;p=karo-tx-linux.git 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 Signed-off-by: Tejun Heo --- diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c index ea865fe953e1..5a44e089c6bb 100644 --- a/drivers/ata/ahci_octeon.c +++ b/drivers/ata/ahci_octeon.c @@ -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);