Merge "compress: fix return value of is_codec_supported" am: 53414059ef
Original change: https://android-review.googlesource.com/c/platform/external/tinycompress/+/2167162
Change-Id: Ia29cf7ff157a77a12111634eda413eb52453a236
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/compress.c b/compress.c
index 7422c4b..ac2c73f 100644
--- a/compress.c
+++ b/compress.c
@@ -574,9 +574,11 @@
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);