Thread (4 messages) flat view 4 messages, 3 authors, 2021-12-23
STALE1726d

[PATCH] ata: libahci_platform: Remove abundant check

From: Jiasheng Jiang <hidden>
Date: 2021-12-22 07:25:12
Also in: lkml
Subsystem: libata sata ahci platform devices support, libata subsystem (serial and parallel ata drivers), the rest · Maintainers: Hans de Goede, Damien Le Moal, Niklas Cassel, Linus Torvalds

It can be found that platform_get_irq() returns nagative code but not
null when fails.
The comment of the platform_get_irq clearly shows that.
Therefore it should be better to remove the useless check.

Fixes: fd990556f0fa ("ata: move library code from ahci_platform.c to libahci_platform.c")
Signed-off-by: Jiasheng Jiang <redacted>
---
 drivers/ata/libahci_platform.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index b2f552088291..5ec68f138c28 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -587,8 +587,6 @@ int ahci_platform_init_host(struct platform_device *pdev,
 			dev_err(dev, "no irq\n");
 		return irq;
 	}
-	if (!irq)
-		return -EINVAL;
 
 	hpriv->irq = irq;
 
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help