aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/basics
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-11-15 15:45:09 +0000
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 12:47:55 -0500
commite778c1319b627e1aabd7aa00757eb50f593fbfa3 (patch)
tree42cdd8ac05e655d226d7d9e39368fb5923683e4e /drivers/gpu/drm/amd/display/dc/basics
parentdrm/ttm: remove cur_placement (diff)
downloadlinux-dev-e778c1319b627e1aabd7aa00757eb50f593fbfa3.tar.xz
linux-dev-e778c1319b627e1aabd7aa00757eb50f593fbfa3.zip
drm/amd/display: remove unnecessary cast and use kcalloc instead of kzalloc
Use kcalloc instead of kzalloc and the cast on the return from kzalloc is unnecessary and can be removed. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics')
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/logger.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c
index e04e8ecd4874..2ff5b467603d 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/logger.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/logger.c
@@ -70,9 +70,8 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger,
{
/* malloc buffer and init offsets */
logger->log_buffer_size = DAL_LOGGER_BUFFER_MAX_SIZE;
- logger->log_buffer = (char *)kzalloc(logger->log_buffer_size * sizeof(char),
- GFP_KERNEL);
-
+ logger->log_buffer = kcalloc(logger->log_buffer_size, sizeof(char),
+ GFP_KERNEL);
if (!logger->log_buffer)
return false;