diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-01-21 22:05:37 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-01-21 22:05:37 +0000 |
commit | ee808384c92adc475e73194a27ff9d40269af87b (patch) | |
tree | fa160a5dcfc536c7b5f8f5525515820cbb7aa800 | |
parent | 66935e5047db724b2f13a819a4f92b0ee496cf6a (diff) | |
download | libfuse-ee808384c92adc475e73194a27ff9d40269af87b.tar.gz |
fix
-rw-r--r-- | kernel/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/inode.c b/kernel/inode.c index 2d41df2..67bc755 100644 --- a/kernel/inode.c +++ b/kernel/inode.c @@ -490,14 +490,14 @@ static struct fuse_conn *get_conn(struct file *file, struct super_block *sb) struct fuse_conn *fc; if (file->f_op != &fuse_dev_operations) - return NULL; + return ERR_PTR(-EINVAL); fc = new_conn(); if (fc == NULL) - return NULL; + return ERR_PTR(-ENOMEM); spin_lock(&fuse_lock); if (file->private_data) { free_conn(fc); - fc = NULL; + fc = ERR_PTR(-EINVAL); } else { file->private_data = fc; fc->sb = sb; @@ -612,8 +612,8 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) fc = get_conn(file, sb); fput(file); - if (fc == NULL) - return -EINVAL; + if (IS_ERR(fc)) + return PTR_ERR(fc); fc->flags = d.flags; fc->user_id = d.user_id; |