Patch "net: ethernet: adi: adin1110: Fix uninitialized variable" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: ethernet: adi: adin1110: Fix uninitialized variable

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-ethernet-adi-adin1110-fix-uninitialized-variable.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 826017a4ab72dddd30e6ec9f710c5b2028641983
Author: Dell Jin <dell.jin.code@xxxxxxxxxxx>
Date:   Fri Oct 20 09:20:53 2023 +0300

    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@xxxxxxxxxxx>
    Signed-off-by: Ciprian Regus <ciprian.regus@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
index ed2863ed6a5bb..7474afc0e8e73 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux