diff mbox series

[v2,06/11] ata: sata_rcar: Remove unnecessary return value check

Message ID 20230707095513.64224-6-frank.li@vivo.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series None | expand

Commit Message

Yangtao Li July 7, 2023, 9:55 a.m. UTC
As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
is invalid") says, there is no need to check if the platform_get_irq
return value is 0. Let's remove it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/sata_rcar.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sergey Shtylyov July 7, 2023, 7:06 p.m. UTC | #1
On 7/7/23 12:55 PM, Yangtao Li wrote:

> As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
> is invalid") says, there is no need to check if the platform_get_irq
> return value is 0. Let's remove it.

   No, that patch still allows returning IRQ0, actually you need:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce753ad1549cbe9ccaea4c06a1f5fa47432c8289

> Signed-off-by: Yangtao Li <frank.li@vivo.com>

   Aside from that:

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey
diff mbox series

Patch

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index f299b41ab3e6..43c55ac89daa 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -867,8 +867,6 @@  static int sata_rcar_probe(struct platform_device *pdev)
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
-	if (!irq)
-		return -EINVAL;
 
 	priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);
 	if (!priv)