From: Sachin Kamat Date: Tue, 20 Nov 2012 00:53:58 +0000 (+0000) Subject: caif: Remove redundant null check before kfree in cfctrl.c X-Git-Tag: MMI-PSA29.97-13-9~15401^2~257 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=973b1b9a454c738edbb2eb8d4596014b575dc15c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git caif: Remove redundant null check before kfree in cfctrl.c 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 --- 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); }