[PATCH 6.12 126/423] lib: 842: Improve error handling in sw842_compress()