diff options
author | Dell Jin <dell.jin.code@outlook.com> | 2023-10-20 08:20:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-21 12:54:42 +0200 |
commit | 965f9b8c0c1b37fa2a0e3ef56e40d5666d4cbb5c (patch) | |
tree | f08d59b4d0d39916ccfdd33a5f175dd9ddbd74ed /drivers/net/ethernet/adi | |
parent | net: stmmac: update MAC capabilities when tx queues are updated (diff) | |
download | linux-965f9b8c0c1b37fa2a0e3ef56e40d5666d4cbb5c.tar.xz linux-965f9b8c0c1b37fa2a0e3ef56e40d5666d4cbb5c.zip |
net: ethernet: adi: adin1110: Fix uninitialized variable
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>
Diffstat (limited to 'drivers/net/ethernet/adi')
-rw-r--r-- | drivers/net/ethernet/adi/adin1110.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c index ca66b747b7c5..d7c274af6d4d 100644 --- a/drivers/net/ethernet/adi/adin1110.c +++ b/drivers/net/ethernet/adi/adin1110.c @@ -294,7 +294,7 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv) { struct adin1110_priv *priv = port_priv->priv; u32 header_len = ADIN1110_RD_HEADER_LEN; - struct spi_transfer t; + struct spi_transfer t = {0}; u32 frame_size_no_fcs; struct sk_buff *rxb; u32 frame_size; |