summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-03-15 10:45:31 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2018-03-16 17:08:41 +1100
commit8d73d64ef99d0906edf845fa9c74f62cc2571096 (patch)
tree7a8838a8ea48606e1c4e68c99da7f108d334e26f /ipc
parent8062210878012a068ea90c5123740e2b5ef61024 (diff)
downloadlinux-next-8d73d64ef99d0906edf845fa9c74f62cc2571096.tar.gz
ipc/mqueue: add missing error code in init_mqueue_fs()
We should propogate the error code here but we accidentally return success. Link: http://lkml.kernel.org/r/20180109092919.ndrvscdllrmzz6jo@mwanda Fixes: 946086abeddf ("mqueue: switch to on-demand creation of internal mount") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index d7f309f74dec..cff46bddf700 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1611,8 +1611,10 @@ static int __init init_mqueue_fs(void)
goto out_filesystem;
m = kern_mount_data(&mqueue_fs_type, &init_ipc_ns);
- if (IS_ERR(m))
+ if (IS_ERR(m)) {
+ error = PTR_ERR(m);
goto out_filesystem;
+ }
init_ipc_ns.mq_mnt = m;
return 0;