powerpc/8xx: fix mpc8xx_get_irq() return on no irq
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 10 Mar 2017 10:37:01 +0000 (11:37 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Jun 2017 09:20:44 +0000 (19:20 +1000)
IRQ 0 is a valid HW interrupt. So get_irq() shall return 0 when
there is no irq, instead of returning irq_linear_revmap(... ,0)

Fixes: f2a0bd3753dad ("[POWERPC] 8xx: powerpc port of core CPM PIC")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/sysdev/mpc8xx_pic.c

index 3e828b20c21eb8d9d3fb813e1e84370a1163ad5a..2842f9d63d215b036b9f4588d7ae1656d3ce95c6 100644 (file)
@@ -79,7 +79,7 @@ unsigned int mpc8xx_get_irq(void)
        irq = in_be32(&siu_reg->sc_sivec) >> 26;
 
        if (irq == PIC_VEC_SPURRIOUS)
-               irq = 0;
+               return 0;
 
         return irq_linear_revmap(mpc8xx_pic_host, irq);