Fixing return codes
authorNathael Pajani <nathael.pajani@ed3l.fr>
Mon, 16 Apr 2012 17:16:08 +0000 (19:16 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Mon, 16 Apr 2012 17:16:08 +0000 (19:16 +0200)
isp_commands.c

index 35ac62a..565eeda 100644 (file)
@@ -703,7 +703,7 @@ int isp_cmd_prepare_for_write(int arg_count, char** args)
 
        if (ret != 0) {
                printf("Error when trying to prepare sectors for write operation.\n");
-               return -1;
+               return ret;
        }
        printf("Sectors prepared for write operation.\n");
 
@@ -716,7 +716,7 @@ int isp_cmd_erase(int arg_count, char** args)
        
        if (ret != 0) {
                printf("Error when trying to erase sectors.\n");
-               return -1;
+               return ret;
        }
        printf("Sectors erased.\n");
 
@@ -724,7 +724,6 @@ int isp_cmd_erase(int arg_count, char** args)
 }
 
 
-
 /* FIXME : Temporary place-holder */
 int isp_cmd_null(int arg_count, char** args)
 {