rmbox: return -EIO and bail on any file open() errors

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2017-06-09 14:37:14 +01:00
parent e03147d755
commit 778d7209cb
1 changed files with 2 additions and 0 deletions

View File

@ -267,6 +267,7 @@ int main(int argc, char *argv[])
if (in_fd == NULL) {
fprintf(stderr, "error: unable to open %s for reading %d\n",
in_file, errno);
return -EIO;
}
/* open outfile for writing */
@ -277,6 +278,7 @@ int main(int argc, char *argv[])
if (out_fd == NULL) {
fprintf(stderr, "error: unable to open %s for writing %d\n",
out_file, errno);
return -EIO;
}
/* start to converting mailbox */