Patch "wl3501_cs: Remove unnecessary NULL check" has been added to the 4.19-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

    wl3501_cs: Remove unnecessary NULL check

to the 4.19-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:
     wl3501_cs-remove-unnecessary-null-check.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 21a78f971fc1457d7cca18d3b669df8c9ebe7e89
Author: Alex Dewar <alex.dewar90@xxxxxxxxx>
Date:   Sat Sep 26 18:45:58 2020 +0100

    wl3501_cs: Remove unnecessary NULL check
    
    [ Upstream commit 1d2a85382282e7c77cbde5650335c3ffc6073fa1 ]
    
    In wl3501_detach(), link->priv is checked for a NULL value before being
    passed to free_netdev(). However, it cannot be NULL at this point as it
    has already been passed to other functions, so just remove the check.
    
    Addresses-Coverity: CID 710499: Null pointer dereferences (REVERSE_INULL)
    Signed-off-by: Alex Dewar <alex.dewar90@xxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200926174558.9436-1-alex.dewar90@xxxxxxxxx
    Stable-dep-of: 391af06a02e7 ("wifi: wl3501_cs: Fix an error handling path in wl3501_probe()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 78c89e6421f97..5b2383270627c 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1438,9 +1438,7 @@ static void wl3501_detach(struct pcmcia_device *link)
 	wl3501_release(link);
 
 	unregister_netdev(dev);
-
-	if (link->priv)
-		free_netdev(link->priv);
+	free_netdev(dev);
 }
 
 static int wl3501_get_name(struct net_device *dev, struct iw_request_info *info,



[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