Commit 72c36b7d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] misc fixes

- A C99 initialiser in drivers/char/mem.c

- Remove unneeded deref in madvise_willneed()
parent 503c99ef
...@@ -619,7 +619,7 @@ static ssize_t kmsg_write(struct file * file, const char * buf, ...@@ -619,7 +619,7 @@ static ssize_t kmsg_write(struct file * file, const char * buf,
} }
static struct file_operations kmsg_fops = { static struct file_operations kmsg_fops = {
write: kmsg_write, .write = kmsg_write,
}; };
static int memory_open(struct inode * inode, struct file * filp) static int memory_open(struct inode * inode, struct file * filp)
......
...@@ -57,7 +57,7 @@ static long madvise_willneed(struct vm_area_struct * vma, ...@@ -57,7 +57,7 @@ static long madvise_willneed(struct vm_area_struct * vma,
{ {
struct file *file = vma->vm_file; struct file *file = vma->vm_file;
if (!vma->vm_file) if (!file)
return -EBADF; return -EBADF;
start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
......
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