aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_overlay.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-19 06:18:32 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 01:45:01 -0400
commitb14c5679dd2c87b5bd14c49c5bdd1962be2ab209 (patch)
treeb838a1c7ec2f69a2b99b41e4d60ac68559df8933 /drivers/gpu/drm/i915/intel_overlay.c
parent4821ff14a32886ee95c8b2850746ec020ca65189 (diff)
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/intel_overlay.c')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index 8d6d0a1bf5bf..a98a990fbab3 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -1053,7 +1053,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
1053 return ret; 1053 return ret;
1054 } 1054 }
1055 1055
1056 params = kmalloc(sizeof(struct put_image_params), GFP_KERNEL); 1056 params = kmalloc(sizeof(*params), GFP_KERNEL);
1057 if (!params) 1057 if (!params)
1058 return -ENOMEM; 1058 return -ENOMEM;
1059 1059
@@ -1320,7 +1320,7 @@ void intel_setup_overlay(struct drm_device *dev)
1320 if (!HAS_OVERLAY(dev)) 1320 if (!HAS_OVERLAY(dev))
1321 return; 1321 return;
1322 1322
1323 overlay = kzalloc(sizeof(struct intel_overlay), GFP_KERNEL); 1323 overlay = kzalloc(sizeof(*overlay), GFP_KERNEL);
1324 if (!overlay) 1324 if (!overlay)
1325 return; 1325 return;
1326 1326