diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:01 -0500 |
commit | c9475cb0c358ff0dd473544280d92482df491913 (patch) | |
tree | 091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/aacraid | |
parent | 089b1dbbde28f0f641c20beabba28fa89ab4fab9 (diff) |
[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 <jesper.juhl@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index ee9067255930..723c0cea7c04 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) | |||
1164 | kfree(hw_fib_pool); | 1164 | kfree(hw_fib_pool); |
1165 | hw_fib_pool = NULL; | 1165 | hw_fib_pool = NULL; |
1166 | } | 1166 | } |
1167 | } else if (hw_fib_pool) { | 1167 | } else { |
1168 | kfree(hw_fib_pool); | 1168 | kfree(hw_fib_pool); |
1169 | hw_fib_pool = NULL; | 1169 | hw_fib_pool = NULL; |
1170 | } | 1170 | } |
@@ -1247,17 +1247,13 @@ int aac_command_thread(struct aac_dev * dev) | |||
1247 | hw_fib_p = hw_fib_pool; | 1247 | hw_fib_p = hw_fib_pool; |
1248 | fib_p = fib_pool; | 1248 | fib_p = fib_pool; |
1249 | while (hw_fib_p < &hw_fib_pool[num]) { | 1249 | while (hw_fib_p < &hw_fib_pool[num]) { |
1250 | if (*hw_fib_p) | 1250 | kfree(*hw_fib_p); |
1251 | kfree(*hw_fib_p); | 1251 | kfree(*fib_p); |
1252 | if (*fib_p) | ||
1253 | kfree(*fib_p); | ||
1254 | ++fib_p; | 1252 | ++fib_p; |
1255 | ++hw_fib_p; | 1253 | ++hw_fib_p; |
1256 | } | 1254 | } |
1257 | if (hw_fib_pool) | 1255 | kfree(hw_fib_pool); |
1258 | kfree(hw_fib_pool); | 1256 | kfree(fib_pool); |
1259 | if (fib_pool) | ||
1260 | kfree(fib_pool); | ||
1261 | } | 1257 | } |
1262 | kfree(fib); | 1258 | kfree(fib); |
1263 | spin_lock_irqsave(dev->queues->queue[HostNormCmdQueue].lock, flags); | 1259 | spin_lock_irqsave(dev->queues->queue[HostNormCmdQueue].lock, flags); |