diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-11 09:26:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-11 09:26:45 +0100 |
commit | c744ca39f28f9a1e94a62ba02483619925d25ddc (patch) | |
tree | bfcd445d31c88130cb0833675e2c7ea1c40f47e0 /drivers/tty/serial/sh-sci.c | |
parent | serial: max310x: Correction of the initial setting of the MODE1 bits for vari... (diff) | |
parent | Linux 5.0-rc6 (diff) | |
download | linux-c744ca39f28f9a1e94a62ba02483619925d25ddc.tar.xz linux-c744ca39f28f9a1e94a62ba02483619925d25ddc.zip |
Merge 5.0-rc6 into tty-next
We need the tty fixes in here for other patches to be based on.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index cb3d5d37674f..060fcd42b6d5 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1936,7 +1936,7 @@ out_nomem: static void sci_free_irq(struct sci_port *port) { - int i; + int i, j; /* * Intentionally in reverse order so we iterate over the muxed @@ -1952,6 +1952,13 @@ static void sci_free_irq(struct sci_port *port) if (unlikely(irq < 0)) continue; + /* Check if already freed (irq was muxed) */ + for (j = 0; j < i; j++) + if (port->irqs[j] == irq) + j = i + 1; + if (j > i) + continue; + free_irq(port->irqs[i], port); kfree(port->irqstr[i]); |