mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
pcmcia: soc_common: ignore invalid interrupts
If gpiod_to_irq() returns an invalid interrupt, we should not try to use it as an interrupt number. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
parent
45ca7536d4
commit
a494119123
@ -179,10 +179,12 @@ static int soc_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
|
||||
if (skt->stat[i].desc) {
|
||||
int irq = gpiod_to_irq(skt->stat[i].desc);
|
||||
|
||||
if (i == SOC_STAT_RDY)
|
||||
skt->socket.pci_irq = irq;
|
||||
else
|
||||
skt->stat[i].irq = irq;
|
||||
if (irq > 0) {
|
||||
if (i == SOC_STAT_RDY)
|
||||
skt->socket.pci_irq = irq;
|
||||
else
|
||||
skt->stat[i].irq = irq;
|
||||
}
|
||||
}
|
||||
|
||||
if (skt->stat[i].irq) {
|
||||
|
Loading…
Reference in New Issue
Block a user