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

Commit eff3bba6 authored by john.maxin@nokia.com's avatar john.maxin@nokia.com Committed by David Woodhouse
Browse files

mtd: onenand: add missing check



Coverity has reported that inside the function "onenand_block_by_block_erase()"
in onenand_base.c, we should add a check to prevent the incrementing of
possible NULL value for "region"

Signed-off-by: default avatarMaxin B. John <john.maxin@nokia.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 26d9be11
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2453,7 +2453,7 @@ static int onenand_block_by_block_erase(struct mtd_info *mtd,
		len -= block_size;
		addr += block_size;

		if (addr == region_end) {
		if (region && addr == region_end) {
			if (!len)
				break;
			region++;