diff options
-rw-r--r-- | board/samsung/origen/tools/mkorigenspl.c | 2 | ||||
-rw-r--r-- | board/samsung/smdkv310/tools/mksmdkv310spl.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/lm81.c | 2 | ||||
-rw-r--r-- | tools/fit_check_sign.c | 2 | ||||
-rw-r--r-- | tools/mkexynosspl.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/board/samsung/origen/tools/mkorigenspl.c b/board/samsung/origen/tools/mkorigenspl.c index 3ed20efce3..8b0c3ac4bd 100644 --- a/board/samsung/origen/tools/mkorigenspl.c +++ b/board/samsung/origen/tools/mkorigenspl.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) } ofd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); - if (ifd < 0) { + if (ofd < 0) { fprintf(stderr, "%s: Can't open %s: %s\n", argv[0], argv[2], strerror(errno)); if (ifd) diff --git a/board/samsung/smdkv310/tools/mksmdkv310spl.c b/board/samsung/smdkv310/tools/mksmdkv310spl.c index 9a64ca6ad6..ea61635db5 100644 --- a/board/samsung/smdkv310/tools/mksmdkv310spl.c +++ b/board/samsung/smdkv310/tools/mksmdkv310spl.c @@ -50,7 +50,7 @@ int main(int argc, char **argv) } ofd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); - if (ifd < 0) { + if (ofd < 0) { fprintf(stderr, "%s: Can't open %s: %s\n", argv[0], argv[2], strerror(errno)); if (ifd) diff --git a/drivers/hwmon/lm81.c b/drivers/hwmon/lm81.c index c1fc42a833..bcc8d3293b 100644 --- a/drivers/hwmon/lm81.c +++ b/drivers/hwmon/lm81.c @@ -90,7 +90,7 @@ int dtt_init_one(int sensor) if (adr < 0) return 1; rev = dtt_read (sensor, DTT_REV); - if (adr < 0) + if (rev < 0) return 1; debug ("DTT: Found LM81@%x Rev: %d\n", adr, rev); diff --git a/tools/fit_check_sign.c b/tools/fit_check_sign.c index 69e99c0d17..d9361b0095 100644 --- a/tools/fit_check_sign.c +++ b/tools/fit_check_sign.c @@ -75,7 +75,7 @@ int main(int argc, char **argv) if (ffd < 0) return EXIT_FAILURE; kfd = mmap_fdt(cmdname, keyfile, 0, &key_blob, &ksbuf, false); - if (ffd < 0) + if (kfd < 0) return EXIT_FAILURE; image_set_host_blob(key_blob); diff --git a/tools/mkexynosspl.c b/tools/mkexynosspl.c index 32b786c724..46195aad55 100644 --- a/tools/mkexynosspl.c +++ b/tools/mkexynosspl.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) } ofd = open(argv[of_index], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); - if (ifd < 0) { + if (ofd < 0) { fprintf(stderr, "%s: Can't open %s: %s\n", prog_name, argv[of_index], strerror(errno)); exit(EXIT_FAILURE); |