aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fc4/fc.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:05 -0500
commit6044ec8882c726e325017bd948aa0cd94ad33abc (patch)
tree3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/fc4/fc.c
parent2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff)
[PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <len.brown@intel.com> Acked-by: "Antonino A. Daplas" <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/fc4/fc.c')
-rw-r--r--drivers/fc4/fc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c
index e375995a2e9b..5c8943509cc1 100644
--- a/drivers/fc4/fc.c
+++ b/drivers/fc4/fc.c
@@ -554,8 +554,8 @@ int fcp_initialize(fc_channel *fcchain, int count)
554 l->logi = kzalloc (count * 3 * sizeof(logi), GFP_KERNEL); 554 l->logi = kzalloc (count * 3 * sizeof(logi), GFP_KERNEL);
555 l->fcmds = kzalloc (count * sizeof(fcp_cmnd), GFP_KERNEL); 555 l->fcmds = kzalloc (count * sizeof(fcp_cmnd), GFP_KERNEL);
556 if (!l->logi || !l->fcmds) { 556 if (!l->logi || !l->fcmds) {
557 if (l->logi) kfree (l->logi); 557 kfree (l->logi);
558 if (l->fcmds) kfree (l->fcmds); 558 kfree (l->fcmds);
559 kfree (l); 559 kfree (l);
560 printk ("FC: Cannot allocate DMA memory for initialization\n"); 560 printk ("FC: Cannot allocate DMA memory for initialization\n");
561 return -ENOMEM; 561 return -ENOMEM;
@@ -674,7 +674,6 @@ int fcp_forceoffline(fc_channel *fcchain, int count)
674 atomic_set (&l.todo, count); 674 atomic_set (&l.todo, count);
675 l.fcmds = kzalloc (count * sizeof(fcp_cmnd), GFP_KERNEL); 675 l.fcmds = kzalloc (count * sizeof(fcp_cmnd), GFP_KERNEL);
676 if (!l.fcmds) { 676 if (!l.fcmds) {
677 kfree (l.fcmds);
678 printk ("FC: Cannot allocate memory for forcing offline\n"); 677 printk ("FC: Cannot allocate memory for forcing offline\n");
679 return -ENOMEM; 678 return -ENOMEM;
680 } 679 }