diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-02-26 09:48:57 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-02-28 11:09:11 +0000 |
commit | bdd85fa01c6078950b93d4c9491694d077c3b60b (patch) | |
tree | 844b1bec50652a30cf051cca5616ca3844e379d5 /utils/ipu3/ipu3-unpack.c | |
parent | 25a8d8b8a914302f1de02af4b0f5ae70568f00ea (diff) |
utils: ipu3: Fix return value check on file output
The data parsed by ipu3-unpack is written out using the write() c
library call, but the error code is incorrectly checked which misses the
single erroroneous return value returned by the function.
Fix it to explicitly check against the error code.
Fixes: 23ac77dc4a09 ("utils: ipu3: Add IPU3 raw capture unpack utility")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/ipu3/ipu3-unpack.c')
-rw-r--r-- | utils/ipu3/ipu3-unpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ipu3/ipu3-unpack.c b/utils/ipu3/ipu3-unpack.c index 9d2c1200..c96fafed 100644 --- a/utils/ipu3/ipu3-unpack.c +++ b/utils/ipu3/ipu3-unpack.c @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) } ret = write(out_fd, out_data, 50); - if (ret < -1) { + if (ret == -1) { fprintf(stderr, "Failed to write output data: %s\n", strerror(errno)); goto done; |