serial: sh-sci: Remove duplicate interrupt check in verify port op
authorLaurent Pinchart <[email protected]>
Fri, 6 Dec 2013 09:59:13 +0000 (10:59 +0100)
committerSimon Horman <[email protected]>
Tue, 24 Dec 2013 02:17:36 +0000 (11:17 +0900)
The driver checks if the interrupt number is greater than nr_irqs and
returns an error in that case. The same check is already performed by
the caller, remove it.

Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
drivers/tty/serial/sh-sci.c

index f2fad4d8eb9e8bc873eefe4964b8d0c8015a9564..8c17d551f32bc594622c2d5f20fdde830c1f6c86 100644 (file)
@@ -2120,7 +2120,7 @@ static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)
 {
        struct sci_port *s = to_sci_port(port);
 
-       if (ser->irq != s->cfg->irqs[SCIx_TXI_IRQ] || ser->irq > nr_irqs)
+       if (ser->irq != s->cfg->irqs[SCIx_TXI_IRQ])
                return -EINVAL;
        if (ser->baud_base < 2400)
                /* No paper tape reader for Mitch.. */