diff options
Diffstat (limited to 'drivers/gpu/drm/drm_auth.c')
-rw-r--r-- | drivers/gpu/drm/drm_auth.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index 932b5aa96a67..3f46772f0cb2 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c | |||
@@ -79,10 +79,9 @@ static int drm_add_magic(struct drm_master *master, struct drm_file *priv, | |||
79 | struct drm_device *dev = master->minor->dev; | 79 | struct drm_device *dev = master->minor->dev; |
80 | DRM_DEBUG("%d\n", magic); | 80 | DRM_DEBUG("%d\n", magic); |
81 | 81 | ||
82 | entry = kmalloc(sizeof(*entry), GFP_KERNEL); | 82 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); |
83 | if (!entry) | 83 | if (!entry) |
84 | return -ENOMEM; | 84 | return -ENOMEM; |
85 | memset(entry, 0, sizeof(*entry)); | ||
86 | entry->priv = priv; | 85 | entry->priv = priv; |
87 | entry->hash_item.key = (unsigned long)magic; | 86 | entry->hash_item.key = (unsigned long)magic; |
88 | mutex_lock(&dev->struct_mutex); | 87 | mutex_lock(&dev->struct_mutex); |