drm/i915/gvt: Add missing breaks in switch statement
authorColin Ian King <colin.king@canonical.com>
Mon, 4 Dec 2017 16:48:18 +0000 (16:48 +0000)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 5 Dec 2017 03:43:46 +0000 (11:43 +0800)
The switch statement is missing breaks for the cases of
GVT_FAILSAFE_INSUFFICIENT_RESOURCE and GVT_FAILSAFE_GUEST_ERR. Add them
in.

Detected by CoverityScan, CID#1462416 ("Missing break in switch")

Fixes: e011c6ce2b4f ("drm/i915/gvt: Add VM healthy check for workload_thread")
Fixes: a33fc7a0482a ("drm/i915/gvt: enter failsafe mode when guest requires more resources")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/handlers.c

index 880448d4adc7e3ad6a183904d6a027d40c855ac1..54f5eac8bcc3c79e3832602a086a989c69c5b15f 100644 (file)
@@ -174,8 +174,10 @@ void enter_failsafe_mode(struct intel_vgpu *vgpu, int reason)
                break;
        case GVT_FAILSAFE_INSUFFICIENT_RESOURCE:
                pr_err("Graphics resource is not enough for the guest\n");
+               break;
        case GVT_FAILSAFE_GUEST_ERR:
                pr_err("GVT Internal error  for the guest\n");
+               break;
        default:
                break;
        }