staging: emxx_udc: Remove null check before kfree
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Tue, 21 Oct 2014 04:18:58 +0000 (09:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Oct 2014 05:43:46 +0000 (13:43 +0800)
This patch was generated by the following semantic patch:

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/emxx_udc/emxx_udc.c

index 1ae0013fb11889a8953d86719f49ccc59dca542a..77e4aee74fa11fa94cabc9eee3364188adc3b937 100644 (file)
@@ -2722,8 +2722,7 @@ static void nbu2ss_ep_free_request(
        if (_req != NULL) {
                req = container_of(_req, struct nbu2ss_req, req);
 
-               if (req != NULL)
-                       kfree(req);
+               kfree(req);
        }
 }