From: Damien Lespiau Date: Wed, 21 Jan 2015 14:07:19 +0000 (+0000) Subject: drm/i915: Use sizeof(*fb) not sizeof(struct ...) in get_initial_plane_config() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d9806c9fd31920a13f4c5b4d4352ffe286d8787c;p=openwrt%2Fstaging%2Fblogic.git drm/i915: Use sizeof(*fb) not sizeof(struct ...) in get_initial_plane_config() Suggested-by: Ville Syrjälä Signed-off-by: Damien Lespiau Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 01dc80b50df5..73b5923de1d8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6586,7 +6586,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc, struct drm_framebuffer *fb; struct intel_framebuffer *intel_fb; - intel_fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); if (!intel_fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return; @@ -7618,7 +7618,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc, struct drm_framebuffer *fb; struct intel_framebuffer *intel_fb; - intel_fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); if (!intel_fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return; @@ -7714,7 +7714,7 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc, struct drm_framebuffer *fb; struct intel_framebuffer *intel_fb; - intel_fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); if (!intel_fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return;