summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-19 12:18:32 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 07:45:01 +0200
commitb14c5679dd2c87b5bd14c49c5bdd1962be2ab209 (patch)
treeb838a1c7ec2f69a2b99b41e4d60ac68559df8933 /drivers/gpu/drm/i915/i915_gem.c
parentMerge tag 'drm-intel-next-2013-09-21-merged' of git://people.freedesktop.org/... (diff)
downloadlinux-b14c5679dd2c87b5bd14c49c5bdd1962be2ab209.tar.xz
linux-b14c5679dd2c87b5bd14c49c5bdd1962be2ab209.zip
drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern
Done while reviewing all our allocations for fubar. Also a few errant cases of lacking () for the sizeof operator - just a bit of OCD. I've left out all the conversions that also should use kcalloc from this patch (it's only 2). Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 36c4ad9c752e..96f65a15ffc9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4638,7 +4638,7 @@ static int i915_gem_init_phys_object(struct drm_device *dev,
if (dev_priv->mm.phys_objs[id - 1] || !size)
return 0;
- phys_obj = kzalloc(sizeof(struct drm_i915_gem_phys_object), GFP_KERNEL);
+ phys_obj = kzalloc(sizeof(*phys_obj), GFP_KERNEL);
if (!phys_obj)
return -ENOMEM;