Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0651910 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

pstore: pmsg: return -ENOMEM on vmalloc failure



Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 23385441
Change-Id: I1c6d98ea23f2fde4e59b6535fcce3a69d862da9b
parent aae1c430
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ static ssize_t write_pmsg(struct file *file, const char __user *buf,
	if (buffer_size > PMSG_MAX_BOUNCE_BUFFER_SIZE)
		buffer_size = PMSG_MAX_BOUNCE_BUFFER_SIZE;
	buffer = vmalloc(buffer_size);
	if (!buffer)
		return -ENOMEM;

	mutex_lock(&pmsg_lock);
	for (i = 0; i < count; ) {