spi: synquacer: drop redundant IRQ zero checks
Subsystems (2)
PATCH 1/1 spi: synquacer: drop redundant IRQ zero checks
platform_get_irq() returns a positive IRQ number on success and a negative errno on failure. It already converts IRQ 0 to -EINVAL.
Check only for negative returns when looking up the RX and TX IRQs.
Signed-off-by Felix Gu <[email protected]>
--- drivers/spi/spi-synquacer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-synquacer.c +2 -2
@@ -667,7 +667,7 @@ static int synquacer_spi_probe(struct platform_device *pdev) host->num_chipselect =SYNQUACER_HSSPI_NUM_CHIP_SELECT ; rx_irq =platform_get_irq (pdev,0 ); -if (rx_irq <=0 ) { +if (rx_irq <0 ) { ret = rx_irq; goto disable_clk; }
@@ -681,7 +681,7 @@ static int synquacer_spi_probe(struct platform_device *pdev) } tx_irq =platform_get_irq (pdev,1 ); -if (tx_irq <=0 ) { +if (tx_irq <0 ) { ret = tx_irq; goto disable_clk; }
---
base-commit: adcad7f4e6332cff3d6d7165f41584899f598534
change-id: 20261121-synquacer-fbdf1dac2165
Best regards,
Signature · 1 line
Felix Gu <[email protected]>