Skip to content

Commit 3cf54b3

Browse files
vsyrjaladanvet
authored andcommitted
drm/i915: Allocate the pipe_crc->entires with kcalloc()
pipe_crc->entries[] is an array so allocate with kcalloc() instead of kzalloc(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 4252fbc commit 3cf54b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3415,8 +3415,8 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe,
34153415
DRM_DEBUG_DRIVER("collecting CRCs for pipe %c, %s\n",
34163416
pipe_name(pipe), pipe_crc_source_name(source));
34173417

3418-
entries = kzalloc(sizeof(*pipe_crc->entries) *
3419-
INTEL_PIPE_CRC_ENTRIES_NR,
3418+
entries = kcalloc(INTEL_PIPE_CRC_ENTRIES_NR,
3419+
sizeof(pipe_crc->entries[0]),
34203420
GFP_KERNEL);
34213421
if (!entries)
34223422
return -ENOMEM;

0 commit comments

Comments
 (0)