drm/i915/gvt: set default value to 0 for unhandled mmio regs
authorZhao Yan <yan.y.zhao@intel.com>
Tue, 21 Feb 2017 06:00:37 +0000 (14:00 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 23 Feb 2017 09:32:16 +0000 (17:32 +0800)
for a handled mmio reg,  its default value is read from hardware, while
for an unhandled mmio regs,  its default value would be random if not
explicitly set to 0

Signed-off-by: Zhao Yan <yan.y.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/firmware.c

index 1cb29b2d7dc638bd701b4ec16eec9edc8fea1133..933a7c211a1c29ab77357119e37b0de2bb3dd521 100644 (file)
@@ -80,7 +80,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)
        int ret;
 
        size = sizeof(*h) + info->mmio_size + info->cfg_space_size - 1;
-       firmware = vmalloc(size);
+       firmware = vzalloc(size);
        if (!firmware)
                return -ENOMEM;