aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-01-18 11:42:50 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-19 15:57:02 -0500
commitae14cafc933b977f368ea7510d3b50b9ad5e1fc6 (patch)
tree714c3c25647f916423b042953c2d59e96dc78de1
parent9b662a3ec21221f2500e8009c849abf9c0136b99 (diff)
net: dsa: mv88e6xxx: Free ATU/VTU irq only when there is chip irq
We only register the ATU and VTU irq when we have a chip level IRQ. In the error path, we should only attempt to remove the ATU and VTU irq if we also have a chip level IRQ. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 54cb00a27408..eb328bade225 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3999,9 +3999,11 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
3999out_mdio: 3999out_mdio:
4000 mv88e6xxx_mdios_unregister(chip); 4000 mv88e6xxx_mdios_unregister(chip);
4001out_g1_vtu_prob_irq: 4001out_g1_vtu_prob_irq:
4002 mv88e6xxx_g1_vtu_prob_irq_free(chip); 4002 if (chip->irq > 0)
4003 mv88e6xxx_g1_vtu_prob_irq_free(chip);
4003out_g1_atu_prob_irq: 4004out_g1_atu_prob_irq:
4004 mv88e6xxx_g1_atu_prob_irq_free(chip); 4005 if (chip->irq > 0)
4006 mv88e6xxx_g1_atu_prob_irq_free(chip);
4005out_g2_irq: 4007out_g2_irq:
4006 if (chip->info->g2_irqs > 0 && chip->irq > 0) 4008 if (chip->info->g2_irqs > 0 && chip->irq > 0)
4007 mv88e6xxx_g2_irq_free(chip); 4009 mv88e6xxx_g2_irq_free(chip);