mirror_ubuntu-kernels/drivers/net/ethernet/microchip
Valentina Goncharenko 25f427ac7b net: encx24j600: Fix invalid logic in reading of MISTAT register
A loop for reading MISTAT register continues while regmap_read() fails
and (mistat & BUSY), but if regmap_read() fails a value of mistat is
undefined.

The patch proposes to check for BUSY flag only when regmap_read()
succeed. Compile test only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: d70e53262f ("net: Microchip encx24j600 driver")
Signed-off-by: Valentina Goncharenko <goncharenko.vp@ispras.ru>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-12-05 09:46:31 +00:00
..
lan966x net: lan966x: Fix potential null-ptr-deref in lan966x_stats_init() 2022-11-16 09:10:29 +00:00
sparx5 net: sparx5: fix error handling in sparx5_port_open() 2022-11-22 11:41:49 +01:00
enc28j60_hw.h
enc28j60.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
encx24j600_hw.h net: encx24j600: check error in devm_regmap_init_encx24j600 2021-10-13 15:25:25 -07:00
encx24j600-regmap.c net: encx24j600: Fix invalid logic in reading of MISTAT register 2022-12-05 09:46:31 +00:00
encx24j600.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
Kconfig net: lan966x: add the basic lan966x driver 2021-11-29 12:58:38 +00:00
lan743x_ethtool.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
lan743x_ethtool.h net: lan743x: Add support to LAN743x register dump 2022-06-16 20:45:48 -07:00
lan743x_main.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
lan743x_main.h net: lan743x: Add support for Rx IP & TCP checksum offload 2022-09-09 08:20:58 +01:00
lan743x_ptp.c eth: lan743x: reject extts for non-pci11x1x devices 2022-10-03 12:39:39 +01:00
lan743x_ptp.h net: lan743x: Add support for PTP-IO Event Output (Periodic Output) 2022-03-18 12:53:23 +00:00
Makefile net: lan966x: add the basic lan966x driver 2021-11-29 12:58:38 +00:00