diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-08-31 16:18:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-01 12:16:37 -0700 |
commit | f441ed0f4c89c14dd68ce477f513bae43509237e (patch) | |
tree | c2486b220f260d3d1c960802e038f8ceba1c531c /drivers/net/dsa/mv88e6xxx/serdes.c | |
parent | 946bc2509eb88ff0c64dd727a11c5a29b6bc2574 (diff) |
net: dsa: mv88e6xxx: fix SERDES IRQ mapping
The current mv88e6xxx SERDES code checks for negative error code from
irq_find_mapping, while this function returns an unsigned integer. This
patch removes this dead code and simply returns 0 is no IRQ is found.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/serdes.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/serdes.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c b/drivers/net/dsa/mv88e6xxx/serdes.c index 7eb7ed68c91d..f65652e6edec 100644 --- a/drivers/net/dsa/mv88e6xxx/serdes.c +++ b/drivers/net/dsa/mv88e6xxx/serdes.c @@ -249,11 +249,8 @@ int mv88e6352_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port) chip->ports[port].serdes_irq = irq_find_mapping(chip->g2_irq.domain, MV88E6352_SERDES_IRQ); - if (chip->ports[port].serdes_irq < 0) { - dev_err(chip->dev, "Unable to map SERDES irq: %d\n", - chip->ports[port].serdes_irq); - return chip->ports[port].serdes_irq; - } + if (!chip->ports[port].serdes_irq) + return 0; /* Requesting the IRQ will trigger irq callbacks. So we cannot * hold the reg_lock. @@ -690,11 +687,8 @@ int mv88e6390_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port) chip->ports[port].serdes_irq = irq_find_mapping(chip->g2_irq.domain, port); - if (chip->ports[port].serdes_irq < 0) { - dev_err(chip->dev, "Unable to map SERDES irq: %d\n", - chip->ports[port].serdes_irq); - return chip->ports[port].serdes_irq; - } + if (!chip->ports[port].serdes_irq) + return 0; /* Requesting the IRQ will trigger irq callbacks. So we cannot * hold the reg_lock. |