memtest: fix 4GB overflow fail
Add condition for checking size_t overflow. This fixes memtest fail
> Memtest failed. Error: -22
which appears when 4GB RAM is present.

Was tested on phyFLEX-i.MX6 modules with 4GB and 1GB RAM.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 8665165 commit 0d8ef327bbb5e3d6e19f9753e663163145e9d1b1
@Dmitry Lavnikevich Dmitry Lavnikevich authored on 23 Jan 2015
Sascha Hauer committed on 27 Jan 2015
Showing 1 changed file
View
commands/memtest.c