generic: phy: aquantia: fix MDI pair property parsing
authorRobert Marko <robimarko@gmail.com>
Mon, 23 Sep 2024 16:16:51 +0000 (18:16 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 23 Sep 2024 16:38:44 +0000 (18:38 +0200)
commit7f46e231eb9864c90db296afea3abd0010b9b5e5
treedd23f6fd26296c1635862eb081524cbeff14119a
parent7c9998f7133b0fdc08956634de792ea41a2e0e6a
generic: phy: aquantia: fix MDI pair property parsing

of_property_read_u32 returns -EINVAL when property does not exist,
according to the documentation -ENOENT is not a valid return code.

So, instead of checking for -ENOENT check for -EINVAL as otherwise the
blamed commit breaks AQR probe since it will return -EINVAL during probe.

Fixes: cb2a11f49c98 ("generic: phy: aquantia: add pending patch to force MDI pair order")
Link: https://github.com/openwrt/openwrt/pull/16466
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/generic/pending-6.6/752-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch