Patch "eth: sp7021: drop free_netdev() from spl2sw_init_netdev()" has been added to the 6.0-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

    eth: sp7021: drop free_netdev() from spl2sw_init_netdev()

to the 6.0-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:
     eth-sp7021-drop-free_netdev-from-spl2sw_init_netdev.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 4c67a0d5a6d1172c872b6c11ca5a647f3f053806
Author: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Date:   Wed Nov 9 15:01:16 2022 +0000

    eth: sp7021: drop free_netdev() from spl2sw_init_netdev()
    
    [ Upstream commit de91b3197d15172407608b2c357aab7ac1451e2b ]
    
    It's not necessary to free netdev allocated with devm_alloc_etherdev()
    and using free_netdev() leads to double free.
    
    Fixes: fd3040b9394c ("net: ethernet: Add driver for Sunplus SP7021")
    Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221109150116.2988194-1-weiyongjun@xxxxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/sunplus/spl2sw_driver.c b/drivers/net/ethernet/sunplus/spl2sw_driver.c
index 61d1d07dc070..d6f1fef4ff3a 100644
--- a/drivers/net/ethernet/sunplus/spl2sw_driver.c
+++ b/drivers/net/ethernet/sunplus/spl2sw_driver.c
@@ -286,7 +286,6 @@ static u32 spl2sw_init_netdev(struct platform_device *pdev, u8 *mac_addr,
 	if (ret) {
 		dev_err(&pdev->dev, "Failed to register net device \"%s\"!\n",
 			ndev->name);
-		free_netdev(ndev);
 		*r_ndev = NULL;
 		return ret;
 	}



[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