Commit 116288d4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: fix error return in mf_proc

From: Anton Blanchard <anton@samba.org>

This patch was submitted by Olaf Hering to fix mf_proc.c where it does not
return error values correctly.
parent 4f3a39f1
...@@ -177,10 +177,14 @@ static int proc_mf_change_cmdline(struct file *file, const char *buffer, ...@@ -177,10 +177,14 @@ static int proc_mf_change_cmdline(struct file *file, const char *buffer,
static int proc_mf_change_vmlinux(struct file *file, const char *buffer, static int proc_mf_change_vmlinux(struct file *file, const char *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
int rc;
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EACCES; return -EACCES;
mf_setVmlinuxChunk(buffer, count, file->f_pos, (u64)data); rc = mf_setVmlinuxChunk(buffer, count, file->f_pos, (u64)data);
if (rc < 0)
return rc;
file->f_pos += count; file->f_pos += count;
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment