summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-13 05:04:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-13 05:04:46 +0000
commitab7a1d20a3def1448bdcc128d77ebf50a672e4a5 (patch)
tree09a6c24baf5e8a0cafc6ebb9fb94b7062e31f7ec /drivers/net/usb
parentAdding debian version 6.10.3-1. (diff)
downloadlinux-ab7a1d20a3def1448bdcc128d77ebf50a672e4a5.tar.xz
linux-ab7a1d20a3def1448bdcc128d77ebf50a672e4a5.zip
Merging upstream version 6.10.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/sr9700.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 0a662e42ed..cb7d2f798f 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -179,6 +179,7 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
struct usbnet *dev = netdev_priv(netdev);
__le16 res;
int rc = 0;
+ int err;
if (phy_id) {
netdev_dbg(netdev, "Only internal phy supported\n");
@@ -189,11 +190,17 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
if (loc == MII_BMSR) {
u8 value;
- sr_read_reg(dev, SR_NSR, &value);
+ err = sr_read_reg(dev, SR_NSR, &value);
+ if (err < 0)
+ return err;
+
if (value & NSR_LINKST)
rc = 1;
}
- sr_share_read_word(dev, 1, loc, &res);
+ err = sr_share_read_word(dev, 1, loc, &res);
+ if (err < 0)
+ return err;
+
if (rc == 1)
res = le16_to_cpu(res) | BMSR_LSTATUS;
else