From: Tapasweni Pathak Date: Tue, 21 Oct 2014 04:18:58 +0000 (+0530) Subject: staging: emxx_udc: Remove null check before kfree X-Git-Tag: v5.15~16669^2~1042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5a89d7a84fa3198e2e39b29325a65c211a0397c;p=platform%2Fkernel%2Flinux-starfive.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 1ae0013..77e4aee 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); } }