aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-15 11:03:06 -0400
committerJan Kara <jack@suse.cz>2017-08-16 10:38:54 -0400
commitba2eb866a89df47d97893f8857d77e98c3c961e0 (patch)
tree0cf26b1ea184e02d3eccb4240cf7b23d6888b626 /fs/udf
parent65f2b26339927a37570ffa42a8fcc8764fef06f7 (diff)
fs-udf: Adjust two checks for null pointers
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 462ac2e9258c..2c0844fae808 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -324,7 +324,8 @@ static void udf_sb_free_partitions(struct super_block *sb)
324{ 324{
325 struct udf_sb_info *sbi = UDF_SB(sb); 325 struct udf_sb_info *sbi = UDF_SB(sb);
326 int i; 326 int i;
327 if (sbi->s_partmaps == NULL) 327
328 if (!sbi->s_partmaps)
328 return; 329 return;
329 for (i = 0; i < sbi->s_partitions; i++) 330 for (i = 0; i < sbi->s_partitions; i++)
330 udf_free_partition(&sbi->s_partmaps[i]); 331 udf_free_partition(&sbi->s_partmaps[i]);
@@ -1071,7 +1072,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
1071 else 1072 else
1072 bitmap = vzalloc(size); /* TODO: get rid of vzalloc */ 1073 bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
1073 1074
1074 if (bitmap == NULL) 1075 if (!bitmap)
1075 return NULL; 1076 return NULL;
1076 1077
1077 bitmap->s_nr_groups = nr_groups; 1078 bitmap->s_nr_groups = nr_groups;