summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/file.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-28 06:36:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-28 06:36:39 +0200
commitd35cc56ddfc948d8df1aa6d41ac345fcec01854d (patch)
tree7e23a0e3dde639236e019aa88309d919941958e5 /fs/kernfs/file.c
parentkobject: Make support for uevent_helper optional. (diff)
parentLinux 3.15-rc3 (diff)
downloadlinux-d35cc56ddfc948d8df1aa6d41ac345fcec01854d.tar.xz
linux-d35cc56ddfc948d8df1aa6d41ac345fcec01854d.zip
Merge 3.15-rc3 into staging-next
Diffstat (limited to 'fs/kernfs/file.c')
-rw-r--r--fs/kernfs/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 98bacd9ea7fd..40251cd741a0 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -485,6 +485,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()