From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Jan Kara <jack@suse.com>, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] fs-udf: Adjust two checks for null pointers
Date: Tue, 15 Aug 2017 15:38:55 +0000 [thread overview]
Message-ID: <1e627b28-e9e6-44a1-e43c-4c32b106e11e@users.sourceforge.net> (raw)
In-Reply-To: <6eedcf1a-57f0-2ba4-d1b8-47a8da945d87@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 15 Aug 2017 17:03:06 +0200
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>
---
fs/udf/super.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 0dc7c2d9f0fa..93c59630512b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -321,7 +321,8 @@ static void udf_sb_free_partitions(struct super_block *sb)
{
struct udf_sb_info *sbi = UDF_SB(sb);
int i;
- if (sbi->s_partmaps = NULL)
+
+ if (!sbi->s_partmaps)
return;
for (i = 0; i < sbi->s_partitions; i++)
udf_free_partition(&sbi->s_partmaps[i]);
@@ -1068,7 +1069,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
else
bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
- if (bitmap = NULL)
+ if (!bitmap)
return NULL;
bitmap->s_nr_groups = nr_groups;
--
2.14.0
next prev parent reply other threads:[~2017-08-15 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 15:35 [PATCH 0/3] fs-udf: Adjustments for some function implementations SF Markus Elfring
2017-08-15 15:36 ` [PATCH 1/3] fs-udf: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
2017-08-15 15:37 ` [PATCH 2/3] fs-udf: Improve six size determinations SF Markus Elfring
2017-08-15 15:38 ` SF Markus Elfring [this message]
2017-08-16 14:43 ` [PATCH 0/3] fs-udf: Adjustments for some function implementations Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1e627b28-e9e6-44a1-e43c-4c32b106e11e@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=jack@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox