diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 6525075f6bd32563fcbc0c65d6e22069891a2277..c648f9fbfa59d8c7758f8de1d1761431d3e23d06 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -2070,7 +2070,8 @@ static int mv88e6xxx_serdes_power(struct mv88e6xxx_chip *chip, int port, if (chip->info->ops->serdes_irq_setup) err = chip->info->ops->serdes_irq_setup(chip, port); } else { - if (chip->info->ops->serdes_irq_free) + if (chip->info->ops->serdes_irq_free && + chip->ports[port].serdes_irq) chip->info->ops->serdes_irq_free(chip, port); err = chip->info->ops->serdes_power(chip, port, false);