drm/i915/gvt/kvmgt: replace kmalloc() by kzalloc()
authorJike Song <jike.song@intel.com>
Thu, 8 Dec 2016 03:00:34 +0000 (11:00 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 16 Dec 2016 08:55:25 +0000 (16:55 +0800)
Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c

index dc036503315741f266223486922ca4ed67afc6de..aecb657d8b99d5b84e94519bb22d190b4932f9c4 100644 (file)
@@ -322,7 +322,7 @@ static void kvmgt_protect_table_add(struct kvmgt_guest_info *info, gfn_t gfn)
        if (kvmgt_gfn_is_write_protected(info, gfn))
                return;
 
-       p = kmalloc(sizeof(struct kvmgt_pgfn), GFP_ATOMIC);
+       p = kzalloc(sizeof(struct kvmgt_pgfn), GFP_ATOMIC);
        if (WARN(!p, "gfn: 0x%llx\n", gfn))
                return;