mtd: slram: invalid checking of absolute end address

Fixed parsing end absolute address.

Signed-off-by: Jiri Engelthaler <engycz@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
Jiri Engelthaler 2012-09-20 16:49:50 +02:00 committed by Artem Bityutskiy
parent 3d70f8c617
commit c36a7ff457

View File

@ -240,7 +240,7 @@ static int parse_cmdline(char *devname, char *szstart, char *szlength)
if (*(szlength) != '+') {
devlength = simple_strtoul(szlength, &buffer, 0);
devlength = handle_unit(devlength, buffer) - devstart;
devlength = handle_unit(devlength, buffer);
if (devlength < devstart)
goto err_out;