mtd: slram: invalid checking of absolute end address
authorJiri Engelthaler <engycz@gmail.com>
Thu, 20 Sep 2012 14:49:50 +0000 (16:49 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 9 Nov 2012 15:02:50 +0000 (17:02 +0200)
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>
drivers/mtd/devices/slram.c

index 8f52fc858e48bec08f900963996c0d37bd4601cb..5a5cd2ace4a6b05126e642e06d04950f52108ab8 100644 (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;