Drop an unnecessary NULL comparison
warning: the address of ‘amdsmi_asic_info_t::vendor_name’ will never be NULL [-Waddress]
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
[ROCm/amdsmi commit: 4a863b27ab]
이 커밋은 다음에 포함됨:
1 부모
02b357526b
커밋
47b2e80ab8
1 파일이 변경됨
+1
-1
@@ -1690,7 +1690,7 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
|
||||
}
|
||||
|
||||
// If vendor name is empty and the vendor id is 0x1002, set vendor name to AMD vendor string
|
||||
if ((info->vendor_name != NULL && info->vendor_name[0] == '\0') && info->vendor_id == 0x1002) {
|
||||
if ((info->vendor_name[0] == '\0') && info->vendor_id == 0x1002) {
|
||||
std::string amd_name = "Advanced Micro Devices Inc. [AMD/ATI]";
|
||||
smi_clear_char_and_reinitialize(info->vendor_name, AMDSMI_MAX_STRING_LENGTH, amd_name);
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단