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>
This commit is contained in:
Ville Syrjälä 2014-12-09 21:28:31 +02:00 committed by Daniel Vetter
parent 4252fbc3d4
commit 3cf54b34da
1 changed files with 2 additions and 2 deletions

View File

@ -3415,8 +3415,8 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe,
DRM_DEBUG_DRIVER("collecting CRCs for pipe %c, %s\n", DRM_DEBUG_DRIVER("collecting CRCs for pipe %c, %s\n",
pipe_name(pipe), pipe_crc_source_name(source)); pipe_name(pipe), pipe_crc_source_name(source));
entries = kzalloc(sizeof(*pipe_crc->entries) * entries = kcalloc(INTEL_PIPE_CRC_ENTRIES_NR,
INTEL_PIPE_CRC_ENTRIES_NR, sizeof(pipe_crc->entries[0]),
GFP_KERNEL); GFP_KERNEL);
if (!entries) if (!entries)
return -ENOMEM; return -ENOMEM;