diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-12-09 14:28:31 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-12-10 11:47:26 -0500 |
commit | 3cf54b34dafe800d9522b93249b6f4c1bfb50de2 (patch) | |
tree | 91d249482469d9b67e793e54f126f13424af38df /drivers/gpu | |
parent | 4252fbc3d4d3abd09ccc7598342cc930d09aac27 (diff) |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 218e27cb3e2f..95829ebecf21 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -3415,8 +3415,8 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe, | |||
3415 | DRM_DEBUG_DRIVER("collecting CRCs for pipe %c, %s\n", | 3415 | DRM_DEBUG_DRIVER("collecting CRCs for pipe %c, %s\n", |
3416 | pipe_name(pipe), pipe_crc_source_name(source)); | 3416 | pipe_name(pipe), pipe_crc_source_name(source)); |
3417 | 3417 | ||
3418 | entries = kzalloc(sizeof(*pipe_crc->entries) * | 3418 | entries = kcalloc(INTEL_PIPE_CRC_ENTRIES_NR, |
3419 | INTEL_PIPE_CRC_ENTRIES_NR, | 3419 | sizeof(pipe_crc->entries[0]), |
3420 | GFP_KERNEL); | 3420 | GFP_KERNEL); |
3421 | if (!entries) | 3421 | if (!entries) |
3422 | return -ENOMEM; | 3422 | return -ENOMEM; |