[Sound-open-firmware] [PATCH 3/4] rmbox: return -EIO and bail on any file open() errors
Liam Girdwood
liam.r.girdwood at linux.intel.com
Fri Jun 9 15:57:58 CEST 2017
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
rmbox/rmbox.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rmbox/rmbox.c b/rmbox/rmbox.c
index 6105e38..0983ca6 100644
--- a/rmbox/rmbox.c
+++ b/rmbox/rmbox.c
@@ -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 */
--
2.11.0
More information about the Sound-open-firmware
mailing list