Message ID | 1353408838-28678-1-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Accepted |
Headers | show |
> kfree on a null pointer is a no-op. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
From: Sjur BRENDELAND <sjur.brandeland@stericsson.com> Date: Tue, 20 Nov 2012 12:04:23 +0100 >> kfree on a null pointer is a no-op. >> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Applied.
diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index 44f270f..a376ec1 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); }
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- net/caif/cfctrl.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)