drm/i915: Use sizeof(*fb) not sizeof(struct ...) in get_initial_plane_config()
authorDamien Lespiau <damien.lespiau@intel.com>
Wed, 21 Jan 2015 14:07:19 +0000 (14:07 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Jan 2015 08:51:08 +0000 (09:51 +0100)
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 01dc80b50df50795e1970784e04b28218518c0f5..73b5923de1d85b72e790dd1e20e66a056b2c6bdf 100644 (file)
@@ -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;