net: ethernet: adi: adin1110: Fix uninitialized variable
authorDell Jin <dell.jin.code@outlook.com>
Fri, 20 Oct 2023 06:20:53 +0000 (09:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Nov 2023 08:35:27 +0000 (09:35 +0100)
commit55b01c5a847e13949498780fd3060143c02ed1b8
tree62db3290547e343c03185c7365ddbcc291422c03
parent9d2b588fae86d7227493e1681be58a5657b66fd0
net: ethernet: adi: adin1110: Fix uninitialized variable

[ Upstream commit 965f9b8c0c1b37fa2a0e3ef56e40d5666d4cbb5c ]

The spi_transfer struct has to have all it's fields initialized to 0 in
this case, since not all of them are set before starting the transfer.
Otherwise, spi_sync_transfer() will sometimes return an error.

Fixes: a526a3cc9c8d ("net: ethernet: adi: adin1110: Fix SPI transfers")
Signed-off-by: Dell Jin <dell.jin.code@outlook.com>
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/adi/adin1110.c