cfi: add LOG_ERROR() in case of unsupported intel erase algorithm
authorØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 14 Jun 2010 13:42:39 +0000 (15:42 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 14 Jun 2010 13:42:39 +0000 (15:42 +0200)
found by code inspection. There are many other places in
CFI where LOG_ERROR() should be called similarly...

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/flash/nor/cfi.c

index c1343175c27dee8f676c9b04ce41864dd7012ba3..96aca48a948fd6340eb1a664d0cd30f1f8d8af8e 100644 (file)
@@ -979,7 +979,10 @@ static int cfi_intel_protect(struct flash_bank *bank, int set, int first, int la
         * instant individual block locking (bit 5).
         */
        if (!(pri_ext->feature_support & 0x28))
+       {
+               LOG_ERROR("lock/unlock not supported on flash");
                return ERROR_FLASH_OPERATION_FAILED;
+       }
 
        cfi_intel_clear_status_register(bank);