We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4e7a7a commit d202797Copy full SHA for d202797
drivers/misc/cxl/api.c
@@ -103,15 +103,15 @@ static struct file *cxl_getfile(const char *name,
103
d_instantiate(path.dentry, inode);
104
105
file = alloc_file(&path, OPEN_FMODE(flags), fops);
106
- if (IS_ERR(file))
107
- goto err_dput;
+ if (IS_ERR(file)) {
+ path_put(&path);
108
+ goto err_fs;
109
+ }
110
file->f_flags = flags & (O_ACCMODE | O_NONBLOCK);
111
file->private_data = priv;
112
113
return file;
114
-err_dput:
- path_put(&path);
115
err_inode:
116
iput(inode);
117
err_fs:
0 commit comments