]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
xen/pci: address a violation of MISRA C Rule 16.3
authorFederico Serafini <federico.serafini@bugseng.com>
Tue, 8 Oct 2024 12:37:16 +0000 (14:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 8 Oct 2024 12:37:16 +0000 (14:37 +0200)
Refactor the code to avoid an implicit fallthrough and address
a violation of MISRA C:2012 Rule 16.3: "An unconditional `break'
statement shall terminate every switch-clause".

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/drivers/passthrough/pci.c

index 5a446d3dcee03ed4879c046a4c35cc5d3ddd602f..74d3895e1ef6cbcb1a2adc372b4e2ac3b7dfe99d 100644 (file)
@@ -170,8 +170,11 @@ static int __init cf_check parse_phantom_dev(const char *str)
     {
     case 1: case 2: case 4:
         if ( *s )
-    default:
             return -EINVAL;
+        break;
+
+    default:
+        return -EINVAL;
     }
 
     phantom_devs[nr_phantom_devs++] = phantom;