[PATCH 1/2] [security check]gvt/kvmgt: use break to get out of for loop
Pei Zhang
pei.zhang at intel.com
Wed Dec 6 03:18:56 UTC 2017
In this function, 'goto' is not necessary for the loop. Use 'break' is
more straightforward.
Signed-off-by: Pei Zhang <pei.zhang at intel.com>
---
drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index 92f9258..9d7d554 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -1337,7 +1337,7 @@ static bool __kvmgt_vgpu_exist(struct intel_vgpu *vgpu, struct kvm *kvm)
info = (struct kvmgt_guest_info *)itr->handle;
if (kvm && kvm == info->kvm) {
ret = true;
- goto out;
+ break;
}
}
out:
--
2.7.4
More information about the intel-gvt-dev
mailing list