Skip to content

Commit

Permalink
serial: sh-sci: Remove duplicate interrupt check in verify port op
Browse files Browse the repository at this point in the history
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 <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Laurent Pinchart authored and Simon Horman committed Dec 24, 2013
1 parent 6557b1f commit b5e17b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.. */
Expand Down

0 comments on commit b5e17b7

Please sign in to comment.