aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/super.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:06 -0500
commitf99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch)
tree41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/ufs/super.c
parent6044ec8882c726e325017bd948aa0cd94ad33abc (diff)
[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ufs/super.c')
-rw-r--r--fs/ufs/super.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index f036d694ba5a..54828ebcf1ba 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -472,13 +472,14 @@ static int ufs_read_cylinder_structures (struct super_block *sb) {
472 return 1; 472 return 1;
473 473
474failed: 474failed:
475 if (base) kfree (base); 475 kfree (base);
476 if (sbi->s_ucg) { 476 if (sbi->s_ucg) {
477 for (i = 0; i < uspi->s_ncg; i++) 477 for (i = 0; i < uspi->s_ncg; i++)
478 if (sbi->s_ucg[i]) brelse (sbi->s_ucg[i]); 478 if (sbi->s_ucg[i])
479 brelse (sbi->s_ucg[i]);
479 kfree (sbi->s_ucg); 480 kfree (sbi->s_ucg);
480 for (i = 0; i < UFS_MAX_GROUP_LOADED; i++) 481 for (i = 0; i < UFS_MAX_GROUP_LOADED; i++)
481 if (sbi->s_ucpi[i]) kfree (sbi->s_ucpi[i]); 482 kfree (sbi->s_ucpi[i]);
482 } 483 }
483 UFSD(("EXIT (FAILED)\n")) 484 UFSD(("EXIT (FAILED)\n"))
484 return 0; 485 return 0;
@@ -981,9 +982,10 @@ magic_found:
981dalloc_failed: 982dalloc_failed:
982 iput(inode); 983 iput(inode);
983failed: 984failed:
984 if (ubh) ubh_brelse_uspi (uspi); 985 if (ubh)
985 if (uspi) kfree (uspi); 986 ubh_brelse_uspi (uspi);
986 if (sbi) kfree(sbi); 987 kfree (uspi);
988 kfree(sbi);
987 sb->s_fs_info = NULL; 989 sb->s_fs_info = NULL;
988 UFSD(("EXIT (FAILED)\n")) 990 UFSD(("EXIT (FAILED)\n"))
989 return -EINVAL; 991 return -EINVAL;