drm: simplify kcalloc() call to kzalloc().
authorRobert P. J. Day <rpjday@crashcourse.ca>
Wed, 10 Jun 2009 19:43:49 +0000 (12:43 -0700)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Jun 2009 06:10:30 +0000 (16:10 +1000)
Calls to kcalloc() for a single element can be simplified to calls to
kzalloc().

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_gem.c

index 4984aa89cf3ddb5e805f3f2f0a6f628d211ea895..ec43005100d978877167721b081d4c985f2dabdf 100644 (file)
@@ -133,7 +133,7 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size)
 
        BUG_ON((size & (PAGE_SIZE - 1)) != 0);
 
-       obj = kcalloc(1, sizeof(*obj), GFP_KERNEL);
+       obj = kzalloc(sizeof(*obj), GFP_KERNEL);
 
        obj->dev = dev;
        obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE);