aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJindong Yue <jindong.yue@nxp.com>2022-07-26 16:14:19 +0800
committerJindong Yue <jindong.yue@nxp.com>2022-07-27 15:58:13 +0800
commit65c97079d288fbaa857f211460fc04111fd785ed (patch)
treee9ea5c0d94d3e557c9dc9b89445dab7038a2d3cf
parentf690ffd9a988d9a71c7ae80b9260b0bba09e69ae (diff)
downloadtinycompress-65c97079d288fbaa857f211460fc04111fd785ed.tar.gz
compress: fix return value of is_codec_supported
The function return type of oops() is int, which mismatches the boolean type of is_codec_supported. Signed-off-by: Jindong Yue <jindong.yue@nxp.com> Change-Id: I892f232d8fb61c8bf8238f55c39c1978436fdb10
-rw-r--r--compress.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/compress.c b/compress.c
index 7422c4b..ac2c73f 100644
--- a/compress.c
+++ b/compress.c
@@ -574,9 +574,11 @@ bool is_codec_supported(unsigned int card, unsigned int device,
ops = &compr_hw_ops;
fd = ops->open(card, device, flags, &data, NULL);
- if (fd < 0)
- return oops(&bad_compress, errno, "cannot open card %u, device %u",
+ if (fd < 0) {
+ oops(&bad_compress, errno, "cannot open card %u, device %u",
card, device);
+ return false;
+ }
ret = _is_codec_type_supported(ops, data, codec);