Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/pm: ensure the fw_info is not null before using it

This resolves the dereference null return value warning
reported by Coverity.

Signed-off-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tim Huang and committed by
Alex Deucher
186fb12e bf2bc616

+2
+2
drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c
··· 1183 1183 fw_info = smu_atom_get_data_table(hwmgr->adev, 1184 1184 GetIndexIntoMasterTable(DATA, FirmwareInfo), 1185 1185 &size, &frev, &crev); 1186 + PP_ASSERT_WITH_CODE(fw_info != NULL, 1187 + "Missing firmware info!", return -EINVAL); 1186 1188 1187 1189 if ((fw_info->ucTableFormatRevision == 1) 1188 1190 && (le16_to_cpu(fw_info->usStructureSize) >= sizeof(ATOM_FIRMWARE_INFO_V1_4)))