diff options
author | Jindong Yue <jindong.yue@nxp.com> | 2022-07-26 16:14:19 +0800 |
---|---|---|
committer | Jindong Yue <jindong.yue@nxp.com> | 2022-07-27 15:58:13 +0800 |
commit | 65c97079d288fbaa857f211460fc04111fd785ed (patch) | |
tree | e9ea5c0d94d3e557c9dc9b89445dab7038a2d3cf | |
parent | f690ffd9a988d9a71c7ae80b9260b0bba09e69ae (diff) | |
download | tinycompress-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |