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

Commit 086ff4b3 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

drivers/misc/lkdtm.c: fix missing allocation failure check

parent e04f2283
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -477,6 +477,8 @@ static ssize_t lkdtm_debugfs_read(struct file *f, char __user *user_buf,
	int i, n, out;

	buf = (char *)__get_free_page(GFP_KERNEL);
	if (buf == NULL)
		return -ENOMEM;

	n = snprintf(buf, PAGE_SIZE, "Available crash types:\n");
	for (i = 0; i < ARRAY_SIZE(cp_type); i++)