summaryrefslogtreecommitdiff
path: root/linux-core/drm_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_memory.c')
-rw-r--r--linux-core/drm_memory.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/linux-core/drm_memory.c b/linux-core/drm_memory.c
index 3370c279..10f43f41 100644
--- a/linux-core/drm_memory.c
+++ b/linux-core/drm_memory.c
@@ -134,13 +134,7 @@ int drm_mem_info(char *buf, char **start, off_t offset,
/** Wrapper around kmalloc() */
void *drm_calloc(size_t nmemb, size_t size, int area)
{
- void *addr;
-
- addr = kmalloc(size * nmemb, GFP_KERNEL);
- if (addr != NULL)
- memset((void *)addr, 0, size * nmemb);
-
- return addr;
+ return kcalloc(nmemb, size, GFP_KERNEL);
}
EXPORT_SYMBOL(drm_calloc);