Showing error 1277

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/isdn/capi/capifs.c
Line in file: 149
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

119        inode->i_nlink = 2;
120
121        capifs_root = s->s_root = d_alloc_root(inode);
122        if (s->s_root)
123                return 0;
124        
125        printk("capifs: get root dentry failed\n");
126        iput(inode);
127fail:
128        return -ENOMEM;
129}
130
131static int capifs_get_sb(struct file_system_type *fs_type,
132        int flags, const char *dev_name, void *data, struct vfsmount *mnt)
133{
134        return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt);
135}
136
137static struct file_system_type capifs_fs_type = {
138        .owner                = THIS_MODULE,
139        .name                = "capifs",
140        .get_sb                = capifs_get_sb,
141        .kill_sb        = kill_anon_super,
142};
143
144static struct dentry *get_node(int num)
145{
146        char s[10];
147        struct dentry *root = capifs_root;
148        mutex_lock(&root->d_inode->i_mutex);
149        return lookup_one_len(s, root, sprintf(s, "%d", num));
150}
151
152void capifs_new_ncci(unsigned int number, dev_t device)
153{
154        struct dentry *dentry;
155        struct inode *inode = new_inode(capifs_mnt->mnt_sb);
156        if (!inode)
157                return;
158        inode->i_ino = number+2;
159        inode->i_uid = config.setuid ? config.uid : current->fsuid;
Show full sources