diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-09-19 06:18:32 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-01 01:45:01 -0400 |
commit | b14c5679dd2c87b5bd14c49c5bdd1962be2ab209 (patch) | |
tree | b838a1c7ec2f69a2b99b41e4d60ac68559df8933 /drivers/gpu/drm/i915/intel_dvo.c | |
parent | 4821ff14a32886ee95c8b2850746ec020ca65189 (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_dvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index ff86c366218c..6305433797ac 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -448,11 +448,11 @@ void intel_dvo_init(struct drm_device *dev) | |||
448 | int i; | 448 | int i; |
449 | int encoder_type = DRM_MODE_ENCODER_NONE; | 449 | int encoder_type = DRM_MODE_ENCODER_NONE; |
450 | 450 | ||
451 | intel_dvo = kzalloc(sizeof(struct intel_dvo), GFP_KERNEL); | 451 | intel_dvo = kzalloc(sizeof(*intel_dvo), GFP_KERNEL); |
452 | if (!intel_dvo) | 452 | if (!intel_dvo) |
453 | return; | 453 | return; |
454 | 454 | ||
455 | intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL); | 455 | intel_connector = kzalloc(sizeof(*intel_connector), GFP_KERNEL); |
456 | if (!intel_connector) { | 456 | if (!intel_connector) { |
457 | kfree(intel_dvo); | 457 | kfree(intel_dvo); |
458 | return; | 458 | return; |