Commit e778c131 authored by Colin Ian King's avatar Colin Ian King Committed by Alex Deucher

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: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 01f83e06
...@@ -70,9 +70,8 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger, ...@@ -70,9 +70,8 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger,
{ {
/* malloc buffer and init offsets */ /* malloc buffer and init offsets */
logger->log_buffer_size = DAL_LOGGER_BUFFER_MAX_SIZE; logger->log_buffer_size = DAL_LOGGER_BUFFER_MAX_SIZE;
logger->log_buffer = (char *)kzalloc(logger->log_buffer_size * sizeof(char), logger->log_buffer = kcalloc(logger->log_buffer_size, sizeof(char),
GFP_KERNEL); GFP_KERNEL);
if (!logger->log_buffer) if (!logger->log_buffer)
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment