From: Jiri Engelthaler Date: Thu, 20 Sep 2012 14:49:50 +0000 (+0200) Subject: mtd: slram: invalid checking of absolute end address X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c36a7ff4578ab6294885aef5ef241aeec4cdb1f0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mtd: slram: invalid checking of absolute end address Fixed parsing end absolute address. Signed-off-by: Jiri Engelthaler Cc: stable@vger.kernel.org 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;