diff options
author | Harsha Sharma <harshasharmaiitr@gmail.com> | 2017-10-13 13:07:47 +0530 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-10-13 15:49:03 -0400 |
commit | 4b947b1c5a26666effcf657428600be2123ca206 (patch) | |
tree | de2735560bc8dde5437866e619646c65d1a2b871 /drivers/gpu/drm/drm_plane_helper.c | |
parent | 9205281cb369a5b2d348e011dd908de81b40e0bf (diff) | |
download | lwn-4b947b1c5a26666effcf657428600be2123ca206.tar.gz lwn-4b947b1c5a26666effcf657428600be2123ca206.zip |
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_plane_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_plane_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 06aee1741e96..759ed93f4ba8 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c @@ -354,7 +354,7 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, /* Find current connectors for CRTC */ num_connectors = get_connectors_for_crtc(crtc, NULL, 0); BUG_ON(num_connectors == 0); - connector_list = kzalloc(num_connectors * sizeof(*connector_list), + connector_list = kcalloc(num_connectors, sizeof(*connector_list), GFP_KERNEL); if (!connector_list) return -ENOMEM; |