Skip to content

Commit 965f9b8

Browse files
NotDelldavem330
authored andcommitted
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: a526a3c ("net: ethernet: adi: adin1110: Fix SPI transfers") Signed-off-by: Dell Jin <[email protected]> Signed-off-by: Ciprian Regus <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 95201f3 commit 965f9b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/adi/adin1110.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv)
294294
{
295295
struct adin1110_priv *priv = port_priv->priv;
296296
u32 header_len = ADIN1110_RD_HEADER_LEN;
297-
struct spi_transfer t;
297+
struct spi_transfer t = {0};
298298
u32 frame_size_no_fcs;
299299
struct sk_buff *rxb;
300300
u32 frame_size;

0 commit comments

Comments
 (0)