summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
authorHarsha Sharma <harshasharmaiitr@gmail.com>2017-10-13 10:37:47 +0300
committerSean Paul <seanpaul@chromium.org>2017-10-13 22:49:03 +0300
commit4b947b1c5a26666effcf657428600be2123ca206 (patch)
treede2735560bc8dde5437866e619646c65d1a2b871 /drivers/gpu/drm/drm_crtc_helper.c
parent9205281cb369a5b2d348e011dd908de81b40e0bf (diff)
downloadlinux-4b947b1c5a26666effcf657428600be2123ca206.tar.xz
drm: Replace kzalloc with kcalloc
Prefer kcalloc over kzalloc to allocate an array. This patch fixes checkcpatch issue. Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20171013073747.29877-1-harshasharmaiitr@gmail.com Link: https://patchwork.freedesktop.org/patch/msgid/20171013073747.29877-1-harshasharmaiitr@gmail.com
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index eab36a460638..5a84c3bc915d 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -562,12 +562,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
* Allocate space for the backup of all (non-pointer) encoder and
* connector data.
*/
- save_encoder_crtcs = kzalloc(dev->mode_config.num_encoder *
+ save_encoder_crtcs = kcalloc(dev->mode_config.num_encoder,
sizeof(struct drm_crtc *), GFP_KERNEL);
if (!save_encoder_crtcs)
return -ENOMEM;
- save_connector_encoders = kzalloc(dev->mode_config.num_connector *
+ save_connector_encoders = kcalloc(dev->mode_config.num_connector,
sizeof(struct drm_encoder *), GFP_KERNEL);
if (!save_connector_encoders) {
kfree(save_encoder_crtcs);