OpenCloudOS-Kernel/drivers/net/ethernet/marvell
Tom Rix 28b18e4eb5 net: sky2: initialize return of gm_phy_read
clang static analysis flags this garbage return

drivers/net/ethernet/marvell/sky2.c:208:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn]
        return v;
        ^~~~~~~~

static inline u16 gm_phy_read( ...
{
	u16 v;
	__gm_phy_read(hw, port, reg, &v);
	return v;
}

__gm_phy_read can return without setting v.

So handle similar to skge.c's gm_phy_read, initialize v.

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-07 15:23:53 -07:00
..
mvpp2 mvpp2: remove module bugfix 2020-06-16 13:41:16 -07:00
octeontx2 treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile octeontx2-af: Add Marvell OcteonTX2 RVU AF driver 2018-10-10 10:06:01 -07:00
mv643xx_eth.c net: mv643xx_eth: Remove unused inline function sum16_as_be 2020-05-05 12:07:43 -07:00
mvmdio.c net: mvmdio: avoid error message for optional IRQ 2020-03-17 20:54:37 -07:00
mvneta.c net: mvneta: fix use of state->speed 2020-06-30 13:01:12 -07:00
mvneta_bm.c net: mvneta: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:52:33 -07:00
mvneta_bm.h net: mvneta: make stub functions static inline 2019-10-25 16:21:48 -07:00
pxa168_eth.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
skge.c net: skge: reject unsupported coalescing params 2020-03-14 21:13:54 -07:00
skge.h PCI: Add constant PCI_STATUS_ERROR_BITS 2020-03-04 14:21:00 -08:00
sky2.c net: sky2: initialize return of gm_phy_read 2020-07-07 15:23:53 -07:00
sky2.h PCI: Add constant PCI_STATUS_ERROR_BITS 2020-03-04 14:21:00 -08:00