mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
dc.c:use kzalloc without test
[ Upstream commit 364593f3ee ]
dc.c:583:null check is needed after using kzalloc function
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: zhongshiqi <zhong.shiqi@zte.com.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bc027c6960
commit
acac5c944e
@@ -566,6 +566,10 @@ static bool construct(struct dc *dc,
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
// Allocate memory for the vm_helper
|
||||
dc->vm_helper = kzalloc(sizeof(struct vm_helper), GFP_KERNEL);
|
||||
if (!dc->vm_helper) {
|
||||
dm_error("%s: failed to create dc->vm_helper\n", __func__);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#endif
|
||||
memcpy(&dc->bb_overrides, &init_params->bb_overrides, sizeof(dc->bb_overrides));
|
||||
|
||||
Reference in New Issue
Block a user