From: Sachin Kamat Date: Tue, 20 Nov 2012 11:40:08 +0000 (+0530) Subject: staging: ozwpan: Remove redundant null check before kfree in ozpd.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b150718ecb6468d2de1ff593c402ec257dd80c8c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging: ozwpan: Remove redundant null check before kfree in ozpd.c kfree on NULL pointer is a no-op. Signed-off-by: Sachin Kamat Signed-off-by: Rupesh Gujare Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 0b3648ce9687..118a4db74dec 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -402,8 +402,7 @@ static void oz_tx_frame_free(struct oz_pd *pd, struct oz_tx_frame *f) f = 0; } spin_unlock_bh(&pd->tx_frame_lock); - if (f) - kfree(f); + kfree(f); } /*------------------------------------------------------------------------------ * Context: softirq-serialized @@ -737,8 +736,7 @@ int oz_isoc_stream_create(struct oz_pd *pd, u8 ep_num) st = 0; } spin_unlock_bh(&pd->stream_lock); - if (st) - kfree(st); + kfree(st); return 0; } /*------------------------------------------------------------------------------