Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: pata_ixp4xx: Remove unnecessary return value check

As commit ce753ad1549c ("platform: finally disallow IRQ0 in
platform_get_irq() and its ilk") 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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

authored by

Yangtao Li and committed by
Damien Le Moal
9402b802 b1aa9984

+2 -5
+2 -5
drivers/ata/pata_ixp4xx_cf.c
··· 274 274 return PTR_ERR(ixpp->ctl); 275 275 276 276 irq = platform_get_irq(pdev, 0); 277 - if (irq > 0) 278 - irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); 279 - else if (irq < 0) 277 + if (irq < 0) 280 278 return irq; 281 - else 282 - return -EINVAL; 279 + irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); 283 280 284 281 /* Just one port to set up */ 285 282 ixp4xx_setup_port(ixpp->host->ports[0], ixpp, cmd->start, ctl->start);