forked from luck/tmp_suning_uos_patched
wl3501_cs: Remove unnecessary NULL check
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
This commit is contained in:
parent
42af278bff
commit
1d2a853822
|
@ -1433,9 +1433,7 @@ static void wl3501_detach(struct pcmcia_device *link)
|
||||||
wl3501_release(link);
|
wl3501_release(link);
|
||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
|
free_netdev(dev);
|
||||||
if (link->priv)
|
|
||||||
free_netdev(link->priv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wl3501_get_name(struct net_device *dev, struct iw_request_info *info,
|
static int wl3501_get_name(struct net_device *dev, struct iw_request_info *info,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user