]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8188eu: os_dep: Remove NULL test before vfree
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sun, 28 Feb 2016 20:30:17 +0000 (02:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit4082b67903e0af7465365a3ab0b62a024209e133
tree3de207a29eb1e526b9851a19ca55350902f98d68
parent06af69feaed2452c17489866309324ca89f2c23c
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>
drivers/staging/rtl8188eu/os_dep/usb_intf.c