Restore original way to handle mdio read error by returning 0xffff.
This was wrongly changed when the internal_mdio_read was introduced,
now that both legacy and internal use the same function, make sure that
they behave the same way.
Fixes: ce062a0adbfe ("net: dsa: qca8k: fix kernel panic with legacy mdio mapping")
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        if (ret >= 0)
                return ret;
 
-       return qca8k_mdio_read(priv, phy, regnum);
+       ret = qca8k_mdio_read(priv, phy, regnum);
+
+       if (ret < 0)
+               return 0xffff;
+
+       return ret;
 }
 
 static int