From a5a89d7a84fa3198e2e39b29325a65c211a0397c Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Tue, 21 Oct 2014 09:48:58 +0530 Subject: [PATCH] staging: emxx_udc: Remove null check before kfree This patch was generated by the following semantic patch: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman --- drivers/staging/emxx_udc/emxx_udc.c | 3 +-- 1 file changed, 1 insertion(+), 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); } } -- 2.30.2