Commit 816deba5 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: misc NULL noise in fs/*

parent a606eaf7
...@@ -201,7 +201,7 @@ asn1_header_decode(struct asn1_ctx *ctx, ...@@ -201,7 +201,7 @@ asn1_header_decode(struct asn1_ctx *ctx,
if (def) if (def)
*eoc = ctx->pointer + len; *eoc = ctx->pointer + len;
else else
*eoc = 0; *eoc = NULL;
return 1; return 1;
} }
......
...@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRange[] = { ...@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRange[] = {
{0x0490, 0x04cc, UniCaseRangeU0490}, {0x0490, 0x04cc, UniCaseRangeU0490},
{0x1e00, 0x1ffc, UniCaseRangeU1e00}, {0x1e00, 0x1ffc, UniCaseRangeU1e00},
{0xff40, 0xff5a, UniCaseRangeUff40}, {0xff40, 0xff5a, UniCaseRangeUff40},
{0, 0, 0} {0}
}; };
#endif #endif
......
...@@ -142,7 +142,7 @@ static int get_device_index(struct coda_mount_data *data) ...@@ -142,7 +142,7 @@ static int get_device_index(struct coda_mount_data *data)
static int coda_fill_super(struct super_block *sb, void *data, int silent) static int coda_fill_super(struct super_block *sb, void *data, int silent)
{ {
struct inode *root = 0; struct inode *root = NULL;
struct coda_sb_info *sbi = NULL; struct coda_sb_info *sbi = NULL;
struct venus_comm *vc = NULL; struct venus_comm *vc = NULL;
struct CodaFid fid; struct CodaFid fid;
......
...@@ -296,7 +296,7 @@ static int coda_psdev_open(struct inode * inode, struct file * file) ...@@ -296,7 +296,7 @@ static int coda_psdev_open(struct inode * inode, struct file * file)
INIT_LIST_HEAD(&vcp->vc_pending); INIT_LIST_HEAD(&vcp->vc_pending);
INIT_LIST_HEAD(&vcp->vc_processing); INIT_LIST_HEAD(&vcp->vc_processing);
init_waitqueue_head(&vcp->vc_waitq); init_waitqueue_head(&vcp->vc_waitq);
vcp->vc_sb = 0; vcp->vc_sb = NULL;
vcp->vc_seq = 0; vcp->vc_seq = 0;
} }
......
...@@ -240,7 +240,7 @@ void coda_sysctl_clean(void) ...@@ -240,7 +240,7 @@ void coda_sysctl_clean(void)
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
if ( fs_table_header ) { if ( fs_table_header ) {
unregister_sysctl_table(fs_table_header); unregister_sysctl_table(fs_table_header);
fs_table_header = 0; fs_table_header = NULL;
} }
#endif #endif
......
...@@ -161,7 +161,7 @@ ext2_get_acl(struct inode *inode, int type) ...@@ -161,7 +161,7 @@ ext2_get_acl(struct inode *inode, int type)
int retval; int retval;
if (!test_opt(inode->i_sb, POSIX_ACL)) if (!test_opt(inode->i_sb, POSIX_ACL))
return 0; return NULL;
switch(type) { switch(type) {
case ACL_TYPE_ACCESS: case ACL_TYPE_ACCESS:
......
...@@ -164,7 +164,7 @@ ext3_get_acl(struct inode *inode, int type) ...@@ -164,7 +164,7 @@ ext3_get_acl(struct inode *inode, int type)
int retval; int retval;
if (!test_opt(inode->i_sb, POSIX_ACL)) if (!test_opt(inode->i_sb, POSIX_ACL))
return 0; return NULL;
switch(type) { switch(type) {
case ACL_TYPE_ACCESS: case ACL_TYPE_ACCESS:
......
...@@ -342,7 +342,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode) ...@@ -342,7 +342,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode)
HFSPLUS_I(inode).cached_start = 0; HFSPLUS_I(inode).cached_start = 0;
HFSPLUS_I(inode).cached_blocks = 0; HFSPLUS_I(inode).cached_blocks = 0;
HFSPLUS_I(inode).phys_size = 0; HFSPLUS_I(inode).phys_size = 0;
HFSPLUS_I(inode).rsrc_inode = 0; HFSPLUS_I(inode).rsrc_inode = NULL;
if (S_ISDIR(inode->i_mode)) { if (S_ISDIR(inode->i_mode)) {
inode->i_size = 2; inode->i_size = 2;
HFSPLUS_SB(sb).folder_count++; HFSPLUS_SB(sb).folder_count++;
......
...@@ -73,7 +73,7 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe ...@@ -73,7 +73,7 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
if (secno & 3) { if (secno & 3) {
printk("HPFS: hpfs_map_4sectors: unaligned read\n"); printk("HPFS: hpfs_map_4sectors: unaligned read\n");
return 0; return NULL;
} }
qbh->data = data = (char *)kmalloc(2048, GFP_NOFS); qbh->data = data = (char *)kmalloc(2048, GFP_NOFS);
...@@ -126,7 +126,7 @@ void *hpfs_get_4sectors(struct super_block *s, unsigned secno, ...@@ -126,7 +126,7 @@ void *hpfs_get_4sectors(struct super_block *s, unsigned secno,
if (secno & 3) { if (secno & 3) {
printk("HPFS: hpfs_get_4sectors: unaligned read\n"); printk("HPFS: hpfs_get_4sectors: unaligned read\n");
return 0; return NULL;
} }
/*return hpfs_map_4sectors(s, secno, qbh, 0);*/ /*return hpfs_map_4sectors(s, secno, qbh, 0);*/
......
...@@ -114,7 +114,7 @@ static int zisofs_readpage(struct file *file, struct page *page) ...@@ -114,7 +114,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
blockendptr = blockptr + 4; blockendptr = blockptr + 4;
indexblocks = ((blockptr^blockendptr) >> bufshift) ? 2 : 1; indexblocks = ((blockptr^blockendptr) >> bufshift) ? 2 : 1;
ptrbh[0] = ptrbh[1] = 0; ptrbh[0] = ptrbh[1] = NULL;
if ( isofs_get_blocks(inode, blockptr >> bufshift, ptrbh, indexblocks) != indexblocks ) { if ( isofs_get_blocks(inode, blockptr >> bufshift, ptrbh, indexblocks) != indexblocks ) {
if ( ptrbh[0] ) brelse(ptrbh[0]); if ( ptrbh[0] ) brelse(ptrbh[0]);
......
...@@ -453,7 +453,7 @@ static struct buffer_head * V1_minix_update_inode(struct inode * inode) ...@@ -453,7 +453,7 @@ static struct buffer_head * V1_minix_update_inode(struct inode * inode)
raw_inode = minix_V1_raw_inode(inode->i_sb, inode->i_ino, &bh); raw_inode = minix_V1_raw_inode(inode->i_sb, inode->i_ino, &bh);
if (!raw_inode) if (!raw_inode)
return 0; return NULL;
raw_inode->i_mode = inode->i_mode; raw_inode->i_mode = inode->i_mode;
raw_inode->i_uid = fs_high2lowuid(inode->i_uid); raw_inode->i_uid = fs_high2lowuid(inode->i_uid);
raw_inode->i_gid = fs_high2lowgid(inode->i_gid); raw_inode->i_gid = fs_high2lowgid(inode->i_gid);
...@@ -480,7 +480,7 @@ static struct buffer_head * V2_minix_update_inode(struct inode * inode) ...@@ -480,7 +480,7 @@ static struct buffer_head * V2_minix_update_inode(struct inode * inode)
raw_inode = minix_V2_raw_inode(inode->i_sb, inode->i_ino, &bh); raw_inode = minix_V2_raw_inode(inode->i_sb, inode->i_ino, &bh);
if (!raw_inode) if (!raw_inode)
return 0; return NULL;
raw_inode->i_mode = inode->i_mode; raw_inode->i_mode = inode->i_mode;
raw_inode->i_uid = fs_high2lowuid(inode->i_uid); raw_inode->i_uid = fs_high2lowuid(inode->i_uid);
raw_inode->i_gid = fs_high2lowgid(inode->i_gid); raw_inode->i_gid = fs_high2lowgid(inode->i_gid);
......
...@@ -232,8 +232,8 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock ) ...@@ -232,8 +232,8 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock )
int ix; int ix;
long offset, i_xblk; long offset, i_xblk;
unsigned long block = 0; unsigned long block = 0;
struct buffer_head *bh = 0; struct buffer_head *bh = NULL;
struct qnx4_xblk *xblk = 0; struct qnx4_xblk *xblk = NULL;
struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode); struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode);
qnx4_nxtnt_t nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts); qnx4_nxtnt_t nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts);
...@@ -269,7 +269,7 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock ) ...@@ -269,7 +269,7 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock )
i_xblk = le32_to_cpu(xblk->xblk_next_xblk); i_xblk = le32_to_cpu(xblk->xblk_next_xblk);
ix = 0; ix = 0;
brelse( bh ); brelse( bh );
bh = 0; bh = NULL;
} }
} }
if ( bh ) if ( bh )
......
...@@ -233,12 +233,12 @@ static struct buffer_head * sysv_update_inode(struct inode * inode) ...@@ -233,12 +233,12 @@ static struct buffer_head * sysv_update_inode(struct inode * inode)
if (!ino || ino > sbi->s_ninodes) { if (!ino || ino > sbi->s_ninodes) {
printk("Bad inode number on dev %s: %d is out of range\n", printk("Bad inode number on dev %s: %d is out of range\n",
inode->i_sb->s_id, ino); inode->i_sb->s_id, ino);
return 0; return NULL;
} }
raw_inode = sysv_raw_inode(sb, ino, &bh); raw_inode = sysv_raw_inode(sb, ino, &bh);
if (!raw_inode) { if (!raw_inode) {
printk("unable to read i-node block\n"); printk("unable to read i-node block\n");
return 0; return NULL;
} }
raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment