]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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>
Wed, 17 Oct 2012 10:28:30 +0000 (13:28 +0300)
Fixed parsing end absolute address.

Signed-off-by: Jiri Engelthaler <engycz@gmail.com>
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;