diff options
author | Tapasweni Pathak <tapaswenipathak@gmail.com> | 2014-10-21 09:48:58 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-23 13:43:46 +0800 |
commit | a5a89d7a84fa3198e2e39b29325a65c211a0397c (patch) | |
tree | 3531faf4486e481deb61363dc889b887d099397b /drivers/staging/emxx_udc | |
parent | 2c1bfc3be0fc525d95ff5983bf8ea3f2aff24d1b (diff) | |
download | linux-a5a89d7a84fa3198e2e39b29325a65c211a0397c.tar.gz linux-a5a89d7a84fa3198e2e39b29325a65c211a0397c.tar.bz2 linux-a5a89d7a84fa3198e2e39b29325a65c211a0397c.zip |
staging: emxx_udc: Remove null check before kfree
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>
Diffstat (limited to 'drivers/staging/emxx_udc')
-rw-r--r-- | drivers/staging/emxx_udc/emxx_udc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 1ae0013fb118..77e4aee74fa1 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -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); } } |