aboutsummaryrefslogtreecommitdiff
path: root/misc-utils
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/recv_image.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/misc-utils/recv_image.c b/misc-utils/recv_image.c
index 7f6662b..eeaa2e2 100644
--- a/misc-utils/recv_image.c
+++ b/misc-utils/recv_image.c
@@ -81,8 +81,7 @@ int main(int argc, char **argv)
printf("Receive to MTD device %s with erasesize %d\n",
argv[3], meminfo.erasesize);
}
- }
- if (flfd == -1) {
+ } else {
/* Try again, as if it's a file */
flfd = open(argv[3], O_CREAT|O_TRUNC|O_RDWR, 0644);
if (flfd < 0) {