net: dsa: mv88e6xxx: check errors in mv88e6352_serdes_irq_link
authorVivien Didelot <vivien.didelot@gmail.com>
Sat, 31 Aug 2019 20:18:27 +0000 (16:18 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Sep 2019 19:16:37 +0000 (12:16 -0700)
commit946bc2509eb88ff0c64dd727a11c5a29b6bc2574
tree15b0b95c5be37f635574c16621e0232307d7544e
parentb943e03341e69cfd384ceabbb4efc28a82f69e0c
net: dsa: mv88e6xxx: check errors in mv88e6352_serdes_irq_link

The mv88e6352_serdes_irq_link helper is not checking for any error that
may occur during hardware accesses. Worst, the "up" boolean is set from
the potentially unused "status" variable, if read operations failed.

As done in mv88e6390_serdes_irq_link_sgmii, return right away and do
not call dsa_port_phylink_mac_change if an error occurred.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/serdes.c