Skip to content

Commit

Permalink
drm: simplify kcalloc() call to kzalloc().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert P. J. Day authored and Dave Airlie committed Jun 11, 2009
1 parent 1bcbf39 commit b798b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b798b1f

Please sign in to comment.