From: Tapasweni Pathak Date: Tue, 21 Oct 2014 04:18:58 +0000 (+0530) Subject: staging: emxx_udc: Remove null check before kfree X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a5a89d7a84fa3198e2e39b29325a65c211a0397c;p=linux-beck.git 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 --- 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); } }