From 4a863b27abc7bc3ecb055de3424f4e6c0cf6b88c Mon Sep 17 00:00:00 2001 From: "Mario Limonciello (AMD)" Date: Fri, 15 Aug 2025 15:04:22 -0500 Subject: [PATCH] Drop an unnecessary NULL comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: the address of ‘amdsmi_asic_info_t::vendor_name’ will never be NULL [-Waddress] Signed-off-by: Mario Limonciello (AMD) --- src/amd_smi/amd_smi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd_smi/amd_smi.cc b/src/amd_smi/amd_smi.cc index dac6969bce..e186f4d080 100644 --- a/src/amd_smi/amd_smi.cc +++ b/src/amd_smi/amd_smi.cc @@ -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); }