Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305296
b: refs/heads/master
c: 0e8963d
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed May 18, 2012
1 parent 3215732 commit 0cb8d30
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1dbccc3c7cc70e8211a7ad6ba55ecbc18e77a5a
refs/heads/master: 0e8963de1fe95e7fbc30c79c1dbc7cb1ea0cf699
19 changes: 18 additions & 1 deletion trunk/drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,17 @@ static int sci_request_irq(struct sci_port *port)
if (SCIx_IRQ_IS_MUXED(port)) {
i = SCIx_MUX_IRQ;
irq = up->irq;
} else
} else {
irq = port->cfg->irqs[i];

/*
* Certain port types won't support all of the
* available interrupt sources.
*/
if (unlikely(!irq))
continue;
}

desc = sci_irq_desc + i;
port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s",
dev_name(up->dev), desc->desc);
Expand Down Expand Up @@ -1094,6 +1102,15 @@ static void sci_free_irq(struct sci_port *port)
* IRQ first.
*/
for (i = 0; i < SCIx_NR_IRQS; i++) {
unsigned int irq = port->cfg->irqs[i];

/*
* Certain port types won't support all of the available
* interrupt sources.
*/
if (unlikely(!irq))
continue;

free_irq(port->cfg->irqs[i], port);
kfree(port->irqstr[i]);

Expand Down

0 comments on commit 0cb8d30

Please sign in to comment.