]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_nand.c
st_smi: Change the flash probing method
[karo-tx-uboot.git] / common / cmd_nand.c
index f060a317e07d94f821f4a60e5dbe2da2124c6523..a91ccf4df37f6f6bb6b69f5453d2efded777db30 100644 (file)
@@ -394,7 +394,6 @@ static int raw_access(nand_info_t *nand, ulong addr, loff_t off, ulong count,
                        int read)
 {
        int ret = 0;
-       size_t rwsize;
 
        while (count--) {
                /* Raw access */
@@ -406,7 +405,6 @@ static int raw_access(nand_info_t *nand, ulong addr, loff_t off, ulong count,
                        .mode = MTD_OOB_RAW
                };
 
-               rwsize = nand->writesize + nand->oobsize;
                if (read)
                        ret = nand->read_oob(nand, off, &ops);
                else
@@ -619,7 +617,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 
                s = strchr(cmd, '.');
 
-               if (!strcmp(s, ".raw")) {
+               if (s && !strcmp(s, ".raw")) {
                        raw = 1;
 
                        if (arg_off(argv[3], &dev, &off, &size))