summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-18 21:47:14 +0200
committerJan Kara <jack@suse.cz>2017-08-23 18:53:06 +0200
commite96e8a1dc12e3186e24c74e42e03b788d3132377 (patch)
treeed67282e47ba02d476c162c49a94e860e4604052 /fs
parent8898662268778a8dde305719564c456c56c54857 (diff)
downloadlinux-e96e8a1dc12e3186e24c74e42e03b788d3132377.tar.gz
linux-e96e8a1dc12e3186e24c74e42e03b788d3132377.tar.bz2
linux-e96e8a1dc12e3186e24c74e42e03b788d3132377.zip
isofs: Adjust four checks for null pointers
The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !... Thus fix the 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')
-rw-r--r--fs/isofs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 2d3f090944df..db43f52f2268 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -96,7 +96,7 @@ static int __init init_inodecache(void)
0, (SLAB_RECLAIM_ACCOUNT|
SLAB_MEM_SPREAD|SLAB_ACCOUNT),
init_once);
- if (isofs_inode_cachep == NULL)
+ if (!isofs_inode_cachep)
return -ENOMEM;
return 0;
}
@@ -678,7 +678,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
if (isonum_711(vdp->type) == ISO_VD_END)
break;
if (isonum_711(vdp->type) == ISO_VD_PRIMARY) {
- if (pri == NULL) {
+ if (!pri) {
pri = (struct iso_primary_descriptor *)vdp;
/* Save the buffer in case we need it ... */
pri_bh = bh;
@@ -742,7 +742,7 @@ root_found:
goto out_freebh;
}
- if (joliet_level && (pri == NULL || !opt.rock)) {
+ if (joliet_level && (!pri || !opt.rock)) {
/* This is the case of Joliet with the norock mount flag.
* A disc with both Joliet and Rock Ridge is handled later
*/
@@ -1320,7 +1320,7 @@ static int isofs_read_inode(struct inode *inode, int relocated)
int frag1 = bufsize - offset;
tmpde = kmalloc(de_len, GFP_KERNEL);
- if (tmpde == NULL) {
+ if (!tmpde) {
ret = -ENOMEM;
goto fail;
}