From 973b1b9a454c738edbb2eb8d4596014b575dc15c Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 20 Nov 2012 00:53:58 +0000 Subject: [PATCH] caif: Remove redundant null check before kfree in cfctrl.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat Acked-by: Sjur Brændeland Signed-off-by: David S. Miller --- net/caif/cfctrl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index 44f270fc2d06..a376ec1ac0a7 100644 --- a/net/caif/cfctrl.c +++ b/net/caif/cfctrl.c @@ -515,8 +515,7 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt) client_layer : NULL); } - if (req != NULL) - kfree(req); + kfree(req); spin_unlock_bh(&cfctrl->info_list_lock); } -- 2.20.1