net: dsa: mv88e6xxx: Return error from irq_find_mapping()
authorAndrew Lunn <andrew@lunn.ch>
Thu, 18 Jan 2018 16:42:49 +0000 (17:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jan 2018 20:57:02 +0000 (15:57 -0500)
Fix a cut/paste error. When irq_find_mapping() returns an error for
the ATU or VTU interrupt, return that error, not the value of
chip->device_irq.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/global1_atu.c
drivers/net/dsa/mv88e6xxx/global1_vtu.c

index b97de9d363372f0e05919f9ee25558ed1cbd53f2..20d941f4273bb0bd2d8be2a364f958ec2c2a3ae0 100644 (file)
@@ -377,7 +377,7 @@ int mv88e6xxx_g1_atu_prob_irq_setup(struct mv88e6xxx_chip *chip)
        chip->atu_prob_irq = irq_find_mapping(chip->g1_irq.domain,
                                              MV88E6XXX_G1_STS_IRQ_ATU_PROB);
        if (chip->atu_prob_irq < 0)
-               return chip->device_irq;
+               return chip->atu_prob_irq;
 
        err = request_threaded_irq(chip->atu_prob_irq, NULL,
                                   mv88e6xxx_g1_atu_prob_irq_thread_fn,
index 53d58a01484a5fa24d494c0cc2cbdb3b5f355cc0..7997961647deb29926d43874c1ba2aa3c8fb3464 100644 (file)
@@ -570,7 +570,7 @@ int mv88e6xxx_g1_vtu_prob_irq_setup(struct mv88e6xxx_chip *chip)
        chip->vtu_prob_irq = irq_find_mapping(chip->g1_irq.domain,
                                              MV88E6XXX_G1_STS_IRQ_VTU_PROB);
        if (chip->vtu_prob_irq < 0)
-               return chip->device_irq;
+               return chip->vtu_prob_irq;
 
        err = request_threaded_irq(chip->vtu_prob_irq, NULL,
                                   mv88e6xxx_g1_vtu_prob_irq_thread_fn,