kernel_samsung_a53x/drivers/net/usb
Javier Carrasco 49384aec66 net: usb: dm9601: fix wrong return value in dm9601_mdio_read
[ Upstream commit c68b2c9eba38ec3f60f4894b189090febf4d8d22 ]

The MII code does not check the return value of mdio_read (among
others), and therefore no error code should be sent. A previous fix to
the use of an uninitialized variable propagates negative error codes,
that might lead to wrong operations by the MII library.

An example of such issues is the use of mii_nway_restart by the dm9601
driver. The mii_nway_restart function does not check the value returned
by mdio_read, which in this case might be a negative number which could
contain the exact bit the function checks (BMCR_ANENABLE = 0x1000).

Return zero in case of error, as it is common practice in users of
mdio_read to avoid wrong uses of the return value.

Fixes: 8f8abb863fa5 ("net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://lore.kernel.org/r/20240225-dm9601_ret_err-v1-1-02c1d959ea59@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 23:18:28 +01:00
..
aqc111.c usb: aqc111: check packet for fixup for true limit 2024-11-18 12:11:56 +01:00
aqc111.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asix.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asix_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asix_devices.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ax88172a.c asix: Add check for usbnet_get_endpoints 2024-11-18 12:12:07 +01:00
ax88179_178a.c net: usb: ax88179_178a: fix failed operations during ax88179_reset 2024-11-18 12:10:55 +01:00
catc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc-phonet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_eem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_ether.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_mbim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_ncm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_subset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ch9200.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cx82310_eth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm9601.c net: usb: dm9601: fix wrong return value in dm9601_mdio_read 2024-11-18 23:18:28 +01:00
gl620a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
huawei_cdc_ncm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
int51x1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipheth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kalmia.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kaweth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lan78xx.c lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected 2024-11-18 23:18:28 +01:00
lan78xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lg-vl600.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcs7830.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net1080.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pegasus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pegasus.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
plusb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qmi_wwan.c net: usb: qmi_wwan: claim interface 4 for ZTE MF290 2024-11-18 12:11:57 +01:00
r8152.c r8152: Release firmware if we have an error in probe 2024-11-18 10:58:30 +01:00
rndis_host.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtl8150.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sierra_net.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc75xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc75xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc95xx.c net: usb: smsc95xx: Fix uninit-value access in smsc95xx_read_reg 2024-11-18 10:58:29 +01:00
smsc95xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9700.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9700.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9800.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9800.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbnet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zaurus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00