Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b32ca44a authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: lock mutex when freeing IRQs



mv88e6xxx_g2_irq_free locks the registers mutex, but not
mv88e6xxx_g1_irq_free, which results in a stack trace from
assert_reg_lock when unloading the mv88e6xxx module. Fix this.

Fixes: 3460a577 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt")
Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent da7c9561
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3951,7 +3951,9 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
	if (chip->irq > 0) {
		if (chip->info->g2_irqs > 0)
			mv88e6xxx_g2_irq_free(chip);
		mutex_lock(&chip->reg_lock);
		mv88e6xxx_g1_irq_free(chip);
		mutex_unlock(&chip->reg_lock);
	}
}