diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c
index 86e37e81735beb727f5949aa382c79f174e3e37b..fe9984f82b9a61e56326519fc1c926063f43c74f 100644
--- a/lustre/llite/lproc_llite.c
+++ b/lustre/llite/lproc_llite.c
@@ -298,7 +298,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
 
         entry = create_proc_entry("dump_page_cache", 0444, sbi->ll_proc_root);
         if (entry == NULL)
-                GOTO(out, -ENOMEM);
+                GOTO(out, err = -ENOMEM);
         entry->proc_fops = &llite_dump_pgcache_fops;
         entry->data = sbi;