diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c index 55f139afa327b9..66364a39011c31 100644 --- a/fs/pstore/pmsg.c +++ b/fs/pstore/pmsg.c @@ -17,6 +17,8 @@ static ssize_t write_pmsg(struct file *file, const char __user *buf, struct pstore_record record; int ret; + return -EFAULT; + if (!count) return 0;