From e1691d3de1fc3326fbb9388de7351d3f5ef6b8e0 Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Wed, 26 Mar 2025 12:30:35 +0100 Subject: [PATCH] lib/inflate.c: remove dead code This is a follow up from a discussion in Xen: The if-statement tests that `res` is non-zero; meaning the case zero is never reached. Link: https://lore.kernel.org/all/7587b503-b2ca-4476-8dc9-e9683d4ca5f0@suse.com/ Link: https://lkml.kernel.org/r/20241219092615.644642-2-ariel.otilibili-anieli@eurecom.fr Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ariel Otilibili Suggested-by: Jan Beulich Signed-off-by: Andrew Morton Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 41c761dede6e Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- xen/common/gzip/inflate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c index b9a2d7a23a..cb146555c8 100644 --- a/xen/common/gzip/inflate.c +++ b/xen/common/gzip/inflate.c @@ -1164,8 +1164,6 @@ static int __init gunzip(struct gunzip_state *s) if ( (res = inflate(s)) ) { switch (res) { - case 0: - break; case 1: error("invalid compressed format (err=1)"); break; -- 2.39.5