From 65c97079d288fbaa857f211460fc04111fd785ed Mon Sep 17 00:00:00 2001 From: Jindong Yue Date: Tue, 26 Jul 2022 16:14:19 +0800 Subject: [PATCH] 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 Change-Id: I892f232d8fb61c8bf8238f55c39c1978436fdb10 --- compress.c | 6 ++++-- 1 file 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);