From c9475cb0c358ff0dd473544280d92482df491913 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 7 Nov 2005 01:01:26 -0800 Subject: [PATCH] kfree cleanup: drivers/scsi This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl Cc: James Bottomley Acked-by: Kai Makisara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/aacraid/commsup.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'drivers/scsi/aacraid/commsup.c') diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index ee906725593..723c0cea7c0 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1164,7 +1164,7 @@ int aac_command_thread(struct aac_dev * dev) kfree(hw_fib_pool); hw_fib_pool = NULL; } - } else if (hw_fib_pool) { + } else { kfree(hw_fib_pool); hw_fib_pool = NULL; } @@ -1247,17 +1247,13 @@ int aac_command_thread(struct aac_dev * dev) hw_fib_p = hw_fib_pool; fib_p = fib_pool; while (hw_fib_p < &hw_fib_pool[num]) { - if (*hw_fib_p) - kfree(*hw_fib_p); - if (*fib_p) - kfree(*fib_p); + kfree(*hw_fib_p); + kfree(*fib_p); ++fib_p; ++hw_fib_p; } - if (hw_fib_pool) - kfree(hw_fib_pool); - if (fib_pool) - kfree(fib_pool); + kfree(hw_fib_pool); + kfree(fib_pool); } kfree(fib); spin_lock_irqsave(dev->queues->queue[HostNormCmdQueue].lock, flags); -- cgit v1.2.3