Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / fs / proc / proc_sysctl.c
index fdda62e..4dbe1e2 100644 (file)
@@ -703,7 +703,7 @@ static int proc_sys_readdir(struct file *file, struct dir_context *ctx)
        ctl_dir = container_of(head, struct ctl_dir, header);
 
        if (!dir_emit_dots(file, ctx))
-               return 0;
+               goto out;
 
        pos = 2;
 
@@ -713,6 +713,7 @@ static int proc_sys_readdir(struct file *file, struct dir_context *ctx)
                        break;
                }
        }
+out:
        sysctl_head_finish(head);
        return 0;
 }
@@ -948,7 +949,7 @@ static struct ctl_dir *get_subdir(struct ctl_dir *dir,
 found:
        subdir->header.nreg++;
 failed:
-       if (unlikely(IS_ERR(subdir))) {
+       if (IS_ERR(subdir)) {
                pr_err("sysctl could not get directory: ");
                sysctl_print_dir(dir);
                pr_cont("/%*.*s %ld\n",