summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Engelthaler <engycz@gmail.com>2012-09-20 16:49:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-12-03 11:47:05 -0800
commit02bbebe27638111d18f63fa7438231def916bd15 (patch)
tree169e7a158b09d11e3711d8943c0b509b8cfbc9e7
parente939e24a7d18f47001ca2e16c4028807120337b3 (diff)
downloadlinux-3.10-02bbebe27638111d18f63fa7438231def916bd15.tar.gz
linux-3.10-02bbebe27638111d18f63fa7438231def916bd15.tar.bz2
linux-3.10-02bbebe27638111d18f63fa7438231def916bd15.zip
mtd: slram: invalid checking of absolute end address
commit c36a7ff4578ab6294885aef5ef241aeec4cdb1f0 upstream. Fixed parsing end absolute address. Signed-off-by: Jiri Engelthaler <engycz@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/mtd/devices/slram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index 8f52fc858e4..5a5cd2ace4a 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;