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

Commit b1b9dfd0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mtd:oobtest: Check the mtd pointers before dereference"

parents f6a387f7 79641d86
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -406,6 +406,9 @@ static int __init mtd_oobtest_init(void)
	if (err)
		goto out;

	if (!mtd || !(mtd->ecclayout) || !(mtd->ecclayout->oobavail))
		goto out;

	use_offset = 0;
	use_len = mtd->ecclayout->oobavail;
	use_len_max = mtd->ecclayout->oobavail;