Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7e9075f authored by Al Viro's avatar Al Viro
Browse files

ocxlflash_getfile(): fix double-iput() on alloc_file() failures



Cc: stable@vger.kernel.org
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent d202797f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -134,15 +134,14 @@ static struct file *ocxlflash_getfile(struct device *dev, const char *name,
		rc = PTR_ERR(file);
		dev_err(dev, "%s: alloc_file failed rc=%d\n",
			__func__, rc);
		goto err5;
		path_put(&path);
		goto err3;
	}

	file->f_flags = flags & (O_ACCMODE | O_NONBLOCK);
	file->private_data = priv;
out:
	return file;
err5:
	path_put(&path);
err4:
	iput(inode);
err3: