diff mbox series

lib/inflate.c: remove dead code

Message ID 552377d2-a2f1-40eb-83dc-fa09931cae6d@suse.com (mailing list archive)
State New
Headers show
Series lib/inflate.c: remove dead code | expand

Commit Message

Jan Beulich March 25, 2025, 8:13 a.m. UTC
From: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr>

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 <ariel.otilibili-anieli@eurecom.fr>
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 41c761dede6e
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper March 25, 2025, 11:44 a.m. UTC | #1
On 25/03/2025 8:13 am, Jan Beulich wrote:
> From: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr>
>
> 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 <ariel.otilibili-anieli@eurecom.fr>
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 41c761dede6e
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/xen/common/gzip/inflate.c
+++ b/xen/common/gzip/inflate.c
@@ -1164,8 +1164,6 @@  static int __init gunzip(struct gunzip_s
     if ( (res = inflate(s)) )
     {
         switch (res) {
-        case 0:
-            break;
         case 1:
             error("invalid compressed format (err=1)");
             break;