All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Delete redundant return value check of platform_get_resource()
@ 2017-02-27 21:41 Belen Sarabia
  2017-03-06 20:41 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Belen Sarabia @ 2017-02-27 21:41 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, linux-kernel

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>
---
 drivers/ata/ahci_octeon.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c
index ea865fe..5a44e08 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Delete redundant return value check of platform_get_resource()
  2017-02-27 21:41 [PATCH] Delete redundant return value check of platform_get_resource() Belen Sarabia
@ 2017-03-06 20:41 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2017-03-06 20:41 UTC (permalink / raw)
  To: Belen Sarabia; +Cc: linux-ide, linux-kernel

On Mon, Feb 27, 2017 at 10:41:18PM +0100, Belen Sarabia wrote:
> 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>

Applied to libata/for-4.12.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-06 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 21:41 [PATCH] Delete redundant return value check of platform_get_resource() Belen Sarabia
2017-03-06 20:41 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.