From 735d5661d5c5f023a78fbe68e771e261040ff1b7 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 7 Nov 2005 01:01:29 -0800 Subject: [PATCH] kfree cleanup: drivers/char This is the drivers/char/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/char/. Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/synclinkmp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/char/synclinkmp.c') diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index f185724448b..7c063c5abc5 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c @@ -2788,10 +2788,8 @@ static void shutdown(SLMP_INFO * info) del_timer(&info->tx_timer); del_timer(&info->status_timer); - if (info->tx_buf) { - kfree(info->tx_buf); - info->tx_buf = NULL; - } + kfree(info->tx_buf); + info->tx_buf = NULL; spin_lock_irqsave(&info->lock,flags); @@ -3611,8 +3609,7 @@ int alloc_tmp_rx_buf(SLMP_INFO *info) void free_tmp_rx_buf(SLMP_INFO *info) { - if (info->tmp_rx_buf) - kfree(info->tmp_rx_buf); + kfree(info->tmp_rx_buf); info->tmp_rx_buf = NULL; } -- cgit v1.2.3