]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: rts5208: Remove NULL test before vfree
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sun, 28 Feb 2016 20:28:44 +0000 (01:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commitb242d05fa3ec5baf83f7a51c7c58757fcf36e321
treeefcef955e122cf409fb63ffa7b6181cf34c01c57
parent7586170c84de561c7bf05dd0df0c4bf9786417d5
staging: rts5208: 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/rts5208/ms.c
drivers/staging/rts5208/xd.c