]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wl3501_cs: Remove unnecessary NULL check
authorAlex Dewar <alex.dewar90@gmail.com>
Sat, 26 Sep 2020 17:45:58 +0000 (18:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:08 +0000 (08:37 +0200)
commit051d70773b9c7cfc86dbba25badf1697ae5ee546
treeddc03c4f726c4eae6003b364856ef9b83f15251b
parent91c3c9eaf1ed048b500ebce77b2afebcf215b6b4
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@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200926174558.9436-1-alex.dewar90@gmail.com
Stable-dep-of: 391af06a02e7 ("wifi: wl3501_cs: Fix an error handling path in wl3501_probe()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/wl3501_cs.c