VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Tejun Heo <tj@kernel.org> 2014-04-20 08:29:21 -0400 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2014-04-25 12:25:13 -0700 commit: b44b2140265ddfde03acbe809336111d31adb0d1 parent: c1befb885939cdaaf420c10bbe9ff57aa00446ea
Commit Summary:
kernfs: add back missing error check in kernfs_fop_mmap()
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 8034706a7af8..e01ea4a14a01 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -484,6 +484,8 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)
 
 	ops = kernfs_ops(of->kn);
 	rc = ops->mmap(of, vma);
+	if (rc)
+		goto out_put;
 
 	/*
 	 * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()