Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a995078 authored by Wei Yongjun's avatar Wei Yongjun Committed by Dave Airlie
Browse files

vmwgfx: remove useless set memory to zero use memset()



The memory return by kzalloc() or kmem_cache_zalloc() has already
be set to zero, so remove useless memset(0).

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent cd004b3f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -437,7 +437,6 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
		DRM_ERROR("Failed allocating a device private struct.\n");
		return -ENOMEM;
	}
	memset(dev_priv, 0, sizeof(*dev_priv));

	pci_set_master(dev->pdev);

+0 −1
Original line number Diff line number Diff line
@@ -483,7 +483,6 @@ static int do_surface_dirty_sou(struct vmw_private *dev_priv,
	}

	/* only need to do this once */
	memset(cmd, 0, fifo_size);
	cmd->header.id = cpu_to_le32(SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN);
	cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));