[PATCH 5.10 148/227] lib: 842: Improve error handling in sw842_compress()