提交 e778c131 编写于 作者: C Colin Ian King 提交者: 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: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 01f83e06
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册