mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
staging: rtl8188eu: os_dep: Remove NULL test before vfree
vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7570ad9104
commit
2c10efbd07
1 changed files with 1 additions and 1 deletions
|
@ -442,7 +442,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
|||
if (status != _SUCCESS) {
|
||||
if (pnetdev)
|
||||
rtw_free_netdev(pnetdev);
|
||||
else if (padapter)
|
||||
else
|
||||
vfree(padapter);
|
||||
padapter = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue