diff options
Diffstat (limited to 'drivers/gpu/drm/drm_dma.c')
-rw-r--r-- | drivers/gpu/drm/drm_dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c index 13f1537413fb..252cbd74df0e 100644 --- a/drivers/gpu/drm/drm_dma.c +++ b/drivers/gpu/drm/drm_dma.c | |||
@@ -47,12 +47,10 @@ int drm_dma_setup(struct drm_device *dev) | |||
47 | { | 47 | { |
48 | int i; | 48 | int i; |
49 | 49 | ||
50 | dev->dma = kmalloc(sizeof(*dev->dma), GFP_KERNEL); | 50 | dev->dma = kzalloc(sizeof(*dev->dma), GFP_KERNEL); |
51 | if (!dev->dma) | 51 | if (!dev->dma) |
52 | return -ENOMEM; | 52 | return -ENOMEM; |
53 | 53 | ||
54 | memset(dev->dma, 0, sizeof(*dev->dma)); | ||
55 | |||
56 | for (i = 0; i <= DRM_MAX_ORDER; i++) | 54 | for (i = 0; i <= DRM_MAX_ORDER; i++) |
57 | memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); | 55 | memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); |
58 | 56 | ||