From: Jiri Engelthaler Date: Thu, 20 Sep 2012 14:49:50 +0000 (+0200) Subject: mtd: slram: invalid checking of absolute end address X-Git-Tag: next-20121019~48^2~28 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4178acbb6f13bf429b9d585dd3f95f5b09ed4784;p=karo-tx-linux.git mtd: slram: invalid checking of absolute end address Fixed parsing end absolute address. Signed-off-by: Jiri Engelthaler Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index 8f52fc858e48..5a5cd2ace4a6 100644 --- a/drivers/mtd/devices/slram.c +++ b/drivers/mtd/devices/slram.c @@ -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;